Skip to content

Commit caa738d

Browse files
authored
feat: approve review (#3398)
1 parent 3f204de commit caa738d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/schema/opportunity.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,6 +2354,15 @@ export const resolvers: IResolvers<unknown, BaseContext> = traceResolvers<
23542354

23552355
break;
23562356
}
2357+
case OpportunityState.LIVE: {
2358+
if (!ctx.isTeamMember) {
2359+
throw new ConflictError('Invalid state transition');
2360+
}
2361+
2362+
await ctx.con.getRepository(OpportunityJob).update({ id }, { state });
2363+
2364+
break;
2365+
}
23572366
case OpportunityState.CLOSED:
23582367
if (opportunity.state !== OpportunityState.LIVE) {
23592368
throw new ConflictError(`This opportunity is not live`);

0 commit comments

Comments
 (0)