File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/server/src/api/rest Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1231,15 +1231,16 @@ class RequestHandler extends APIHandlerBase {
12311231 }
12321232
12331233 private makePrismaIdFilter ( idFields : FieldInfo [ ] , resourceId : string ) {
1234+ const decodedId = decodeURIComponent ( resourceId ) ;
12341235 if ( idFields . length === 1 ) {
1235- return { [ idFields [ 0 ] . name ] : this . coerce ( idFields [ 0 ] . type , resourceId ) } ;
1236+ return { [ idFields [ 0 ] . name ] : this . coerce ( idFields [ 0 ] . type , decodedId ) } ;
12361237 } else {
12371238 return {
12381239 // TODO: support `@@id` with custom name
12391240 [ idFields . map ( ( idf ) => idf . name ) . join ( prismaIdDivider ) ] : idFields . reduce (
12401241 ( acc , curr , idx ) => ( {
12411242 ...acc ,
1242- [ curr . name ] : this . coerce ( curr . type , resourceId . split ( this . idDivider ) [ idx ] ) ,
1243+ [ curr . name ] : this . coerce ( curr . type , decodedId . split ( this . idDivider ) [ idx ] ) ,
12431244 } ) ,
12441245 { }
12451246 ) ,
You can’t perform that action at this time.
0 commit comments