Logging & Styling
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { User } from 'src/model/entitites';
|
||||
import { EmailLogRepository } from 'src/model/repositories/log';
|
||||
|
||||
@Injectable()
|
||||
@@ -11,6 +12,8 @@ export class LogService {
|
||||
log(type: LogType, data: any) {
|
||||
if (type == LogType.Mail) {
|
||||
return this.logEmail(data);
|
||||
} else if (type == LogType.Auth) {
|
||||
return this.logAuthEvent(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,10 +21,15 @@ export class LogService {
|
||||
const log = this.emailLogRepo.create(data);
|
||||
const logEntry = await this.emailLogRepo.save(log);
|
||||
}
|
||||
|
||||
private async logAuthEvent(data: User) {
|
||||
console.error("auth logging not implemented")
|
||||
}
|
||||
}
|
||||
|
||||
export enum LogType {
|
||||
Mail
|
||||
Mail,
|
||||
Auth
|
||||
}
|
||||
|
||||
export enum EmailEvent {
|
||||
|
||||
Reference in New Issue
Block a user