Revert "fix: resolve all ESLint errors in backend and frontend"
Build and Push Multi-Platform Images / build-and-push (push) Successful in 19s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 19s
This reverts commit 07dfd7e840.
This commit is contained in:
1 parent
14c11bf718
commit
66aeab282c
43 files changed
+204
-399
No files matched your search
@@ -1,7 +1,5 @@
|
||||
import { Controller, Post, Request, HttpCode } from '@nestjs/common';
|
||||
import { DailyDigestService } from './daily-digest.service';
|
||||
import type { AuthenticatedRequest } from '../auth/authenticated-request';
|
||||
import { getErrorMessage } from '../common/error.util';
|
||||
|
||||
@Controller('api/daily-digest')
|
||||
export class DailyDigestController {
|
||||
@@ -9,8 +7,8 @@ export class DailyDigestController {
|
||||
|
||||
@Post('send-now')
|
||||
@HttpCode(200)
|
||||
async sendNow(@Request() req: AuthenticatedRequest) {
|
||||
const { userId, email, preferredUsername, groups } = req.user!;
|
||||
async sendNow(@Request() req: any) {
|
||||
const { userId, email, preferredUsername, groups } = req.user;
|
||||
if (!email) {
|
||||
return {
|
||||
ok: false,
|
||||
@@ -21,12 +19,12 @@ export class DailyDigestController {
|
||||
await this.dailyDigestService.sendDigestForUser(
|
||||
userId,
|
||||
email,
|
||||
preferredUsername ?? undefined,
|
||||
preferredUsername,
|
||||
groups,
|
||||
);
|
||||
return { ok: true };
|
||||
} catch (err: unknown) {
|
||||
return { ok: false, error: getErrorMessage(err) };
|
||||
} catch (err: any) {
|
||||
return { ok: false, error: err.message };
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user