secure type with passphrase

This commit is contained in:
Julian Krauser 2024-12-03 19:29:38 +01:00
parent 597feef9ef
commit 8f49533fcb
9 changed files with 44 additions and 2 deletions

View file

@ -2,6 +2,7 @@ export interface CreateCalendarTypeCommand {
type: string;
nscdr: boolean;
color: string;
passphrase?: string;
}
export interface UpdateCalendarTypeCommand {
@ -9,6 +10,7 @@ export interface UpdateCalendarTypeCommand {
type: string;
nscdr: boolean;
color: string;
passphrase?: string;
}
export interface DeleteCalendarTypeCommand {

View file

@ -18,6 +18,7 @@ export default abstract class CalendarTypeCommandHandler {
type: createCalendarType.type,
nscdr: createCalendarType.nscdr,
color: createCalendarType.color,
passphrase: createCalendarType.nscdr ? null : createCalendarType.passphrase,
})
.execute()
.then((result) => {
@ -41,6 +42,7 @@ export default abstract class CalendarTypeCommandHandler {
type: updateCalendarType.type,
nscdr: updateCalendarType.nscdr,
color: updateCalendarType.color,
passphrase: updateCalendarType.nscdr ? null : updateCalendarType.passphrase,
})
.where("id = :id", { id: updateCalendarType.id })
.execute()