File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ const dataRoutes: FastifyPluginAsync = async (app) => {
6767 schema : {
6868 params : {
6969 type : "object" ,
70- properties : { id : { type : "string" , minLength : 10 , maxLength : 10 } } ,
70+ properties : { id : { type : "string" , minLength : 16 , maxLength : 16 } } ,
7171 required : [ "id" ] ,
7272 } ,
7373 } ,
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const mapRoutes: FastifyPluginAsync = async (app) => {
2727 schema : {
2828 params : {
2929 type : "object" ,
30- properties : { id : { type : "string" , minLength : 10 , maxLength : 10 } } ,
30+ properties : { id : { type : "string" , minLength : 16 , maxLength : 16 } } ,
3131 required : [ "id" ] ,
3232 } ,
3333 } ,
@@ -48,7 +48,7 @@ const mapRoutes: FastifyPluginAsync = async (app) => {
4848 schema : {
4949 params : {
5050 type : "object" ,
51- properties : { id : { type : "string" , minLength : 10 , maxLength : 10 } } ,
51+ properties : { id : { type : "string" , minLength : 16 , maxLength : 16 } } ,
5252 required : [ "id" ] ,
5353 } ,
5454 } ,
Original file line number Diff line number Diff line change @@ -8,12 +8,13 @@ interface ApiError {
88 error ?: any ;
99}
1010
11- const API_URL = process . env . NEXT_PUBLIC_API_URL || "http://localhost:3001" ;
11+ const NEXT_PUBLIC_API_URL = process . env . NEXT_PUBLIC_API_URL || "http://localhost:3001" ;
12+ const API_URL = process . env . API_URL || "http://localhost:3001" ;
1213const JWT_SECRET = process . env . NEXTAUTH_SECRET || "" ;
1314
1415export async function fetchApi < T > ( endpoint : string , options ?: RequestInit ) : Promise < T > {
1516 const isAbsolute = / ^ h t t p s ? : \/ \/ / i. test ( endpoint ) ;
16- const url = isAbsolute ? endpoint : `${ API_URL } ${ endpoint } ` ;
17+ const url = isAbsolute ? endpoint : `${ NEXT_PUBLIC_API_URL } ${ endpoint } ` ;
1718
1819 const response = await fetch ( url , {
1920 ...options ,
You can’t perform that action at this time.
0 commit comments