File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -79,13 +79,13 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
79
79
await fastify . zodValidateBody ( request , reply , entraProfilePatchRequest ) ;
80
80
} ,
81
81
onRequest : async ( request , reply ) => {
82
- await fastify . authorize ( request , reply , allAppRoles ) ;
82
+ await fastify . authorize ( request , reply , [ ] ) ;
83
83
} ,
84
84
} ,
85
85
async ( request , reply ) => {
86
86
if ( ! request . tokenPayload || ! request . username ) {
87
- throw new UnauthorizedError ( {
88
- message : "User does not have the privileges for this task ." ,
87
+ throw new InternalServerError ( {
88
+ message : "Could not find token payload and/or username ." ,
89
89
} ) ;
90
90
}
91
91
const userOid = request . tokenPayload [ "oid" ] ;
@@ -99,7 +99,7 @@ const iamRoutes: FastifyPluginAsync = async (fastify, _options) => {
99
99
userOid ,
100
100
request . body ,
101
101
) ;
102
- reply . send ( 201 ) ;
102
+ reply . status ( 201 ) ;
103
103
} ,
104
104
) ;
105
105
fastify . get < {
You can’t perform that action at this time.
0 commit comments