maybe fix final

This commit is contained in:
renzynx 2022-12-22 15:24:47 +07:00
parent 2cb57f245a
commit 1bf293347e
2 changed files with 13 additions and 2 deletions

View File

@ -52,7 +52,16 @@ export class AuthController {
@UseGuards(AuthGuard)
@Get("me")
async me(@Request() req: ERequest) {
return this.authService.me((req.session as CustomSession).userId);
async me(@Request() req: ERequest, @Response() res: EResponse) {
const user = await this.authService.me(
(req.session as CustomSession).userId
);
return res
.setHeader("Cache-Control", "no-store")
.setHeader("Pragma", "no-cache")
.setDefaultEncoding("utf-8")
.setHeader("Content-Type", "application/json")
.json(user);
}
}

View File

@ -1,6 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
optimizeFonts: true,
};
module.exports = nextConfig;