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 {
1231
1231
}
1232
1232
1233
1233
private makePrismaIdFilter ( idFields : FieldInfo [ ] , resourceId : string ) {
1234
+ const decodedId = decodeURIComponent ( resourceId ) ;
1234
1235
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 ) } ;
1236
1237
} else {
1237
1238
return {
1238
1239
// TODO: support `@@id` with custom name
1239
1240
[ idFields . map ( ( idf ) => idf . name ) . join ( prismaIdDivider ) ] : idFields . reduce (
1240
1241
( acc , curr , idx ) => ( {
1241
1242
...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 ] ) ,
1243
1244
} ) ,
1244
1245
{ }
1245
1246
) ,
You can’t perform that action at this time.
0 commit comments