diff --git a/app/challenges-platform/services/reviews-service.ts b/app/challenges-platform/services/reviews-service.ts index b221159..112fb50 100644 --- a/app/challenges-platform/services/reviews-service.ts +++ b/app/challenges-platform/services/reviews-service.ts @@ -59,10 +59,10 @@ export const create = async ( export const convert = async (result: any): Promise> => { let status: Status; switch (result.status) { - case "approved": + case "APPROVED": status = Status.APPROVED; break; - case "rejected": + case "REJECTED": status = Status.REJECTED; break; default: diff --git a/test/challenges-platform/factories/review-factory.ts b/test/challenges-platform/factories/review-factory.ts index 44cc158..a207f65 100644 --- a/test/challenges-platform/factories/review-factory.ts +++ b/test/challenges-platform/factories/review-factory.ts @@ -21,7 +21,7 @@ export const reviewFactory = async ({ const s = submission || (await submissionFactory()); const b = body || "test review"; - const statusString = st === Status.APPROVED ? "approved" : "rejected"; + const statusString = st === Status.APPROVED ? "APPROVED" : "REJECTED"; const insertResult = await db .insert(reviews) .values({