🚀Bumped version to v0.4.3
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nicolai Ort 2021-02-07 13:40:32 +01:00
parent f3f5cb462e
commit 656d564baa
2 changed files with 111 additions and 112 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@odit/lfk-backend", "name": "@odit/lfk-backend",
"version": "0.4.2", "version": "0.4.3",
"main": "src/app.ts", "main": "src/app.ts",
"repository": "https://git.odit.services/lfk/backend", "repository": "https://git.odit.services/lfk/backend",
"author": { "author": {

View File

@ -31,7 +31,6 @@ export class AuthController {
@OpenAPI({ description: 'Login with your username/email and password. <br> You will receive: \n * access token (use it as a bearer token) \n * refresh token (will also be sent as a cookie)' }) @OpenAPI({ description: 'Login with your username/email and password. <br> You will receive: \n * access token (use it as a bearer token) \n * refresh token (will also be sent as a cookie)' })
async login(@Body({ validate: true }) createAuth: CreateAuth, @Res() response: any) { async login(@Body({ validate: true }) createAuth: CreateAuth, @Res() response: any) {
let auth; let auth;
console.log(createAuth)
try { try {
auth = await createAuth.toAuth(); auth = await createAuth.toAuth();
response.cookie('lfk_backend__refresh_token', auth.refresh_token, { expires: new Date(auth.refresh_token_expires_at * 1000), httpOnly: true }); response.cookie('lfk_backend__refresh_token', auth.refresh_token, { expires: new Date(auth.refresh_token_expires_at * 1000), httpOnly: true });