Skip to content

Commit 8b4a138

Browse files
committed
signup return also userid
1 parent 950c4ee commit 8b4a138

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/controllers/user.controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export class UserController {
217217
},
218218
})
219219
credentials: UserCredentials,
220-
): Promise<string> {
220+
): Promise<{token: string, userId: number}> {
221221
validateCredentials(
222222
_.pick(credentials, ['email', 'password0', 'password1', 'username']),
223223
);
@@ -257,7 +257,7 @@ export class UserController {
257257
expiresIn: 60,
258258
algorithm: 'HS256',
259259
});
260-
return token;
260+
return {token: token, userId: userId};
261261
}
262262

263263
@post('/save-Wrapped-DEK', {

0 commit comments

Comments
 (0)