fix(gateway): close session and resume boundaries
This commit is contained in:
@@ -1256,10 +1256,10 @@ export const adminRouter = router({
|
||||
canManageProfiles || hasScopedPermission(adminAuth, ROLE_SURVEY_OPEN, profile.profileName);
|
||||
|
||||
if (input.action === 'RESUME') {
|
||||
if (profile.status !== 'STOPPED') {
|
||||
if (profile.status !== 'STOPPED' && profile.status !== 'PAUSED') {
|
||||
throw new TRPCError({
|
||||
code: 'BAD_REQUEST',
|
||||
message: 'Resume is allowed only for STOPPED profiles.',
|
||||
message: 'Resume is allowed only for STOPPED or PAUSED profiles.',
|
||||
});
|
||||
}
|
||||
if (!canResume) {
|
||||
|
||||
@@ -692,17 +692,6 @@ export const appRouter = router({
|
||||
issuedAt: payload.issuedAt,
|
||||
};
|
||||
}),
|
||||
flushUser: procedure
|
||||
.input(
|
||||
z.object({
|
||||
userId: z.string().min(1),
|
||||
reason: z.string().min(1).optional(),
|
||||
})
|
||||
)
|
||||
.mutation(async ({ ctx, input }) => {
|
||||
await ctx.flushPublisher.publishUserFlush(input.userId, input.reason);
|
||||
return { ok: true };
|
||||
}),
|
||||
validateGameSession: procedure
|
||||
.input(
|
||||
z.object({
|
||||
|
||||
Reference in New Issue
Block a user