This commit is contained in:
Julien Valverdé
2024-07-17 21:45:32 +02:00
parent 0d792ad8be
commit af7d944116

View File

@@ -37,7 +37,7 @@ export class TodoRepositoryService {
add(todo: Todo) { add(todo: Todo) {
return Effect.gen(this, function*() { return Effect.gen(this, function*() {
if (Option.isSome(todo.id)) if (Option.isSome(todo.id))
return yield* Effect.fail(new TodoHasID({ todo })) return yield* new TodoHasID({ todo })
const id: string = crypto.randomUUID() const id: string = crypto.randomUUID()