Update operations.ts.diff

This commit is contained in:
vincanger 2025-02-13 13:23:06 +01:00
parent 7a30c41529
commit c842ee589f

View File

@ -1,16 +1,6 @@
--- template/app/src/user/operations.ts
+++ opensaas-sh/app/src/user/operations.ts
@@ -1,8 +1,4 @@
-import {
- type UpdateCurrentUser,
- type UpdateUserById,
- type GetPaginatedUsers,
-} from 'wasp/server/operations';
+import { type UpdateCurrentUser, type UpdateUserById, type GetPaginatedUsers } from 'wasp/server/operations';
import { type User } from 'wasp/entities';
import { HttpError } from 'wasp/server';
import { type SubscriptionStatus } from '../payment/plans';
@@ -50,7 +46,10 @@
@@ -50,7 +50,10 @@
subscriptionStatus?: SubscriptionStatus[];
};
type GetPaginatedUsersOutput = {
@ -22,7 +12,7 @@
totalPages: number;
};
@@ -63,8 +62,10 @@
@@ -63,8 +66,10 @@
}
const allSubscriptionStatusOptions = args.subscriptionStatus as Array<string | null> | undefined;
@ -35,7 +25,7 @@
const queryResults = await context.entities.User.findMany({
skip: args.skip,
@@ -77,6 +78,7 @@
@@ -77,6 +82,7 @@
mode: 'insensitive',
},
isAdmin: args.isAdmin,
@ -43,7 +33,7 @@
},
{
OR: [
@@ -101,7 +103,7 @@
@@ -101,7 +107,7 @@
isAdmin: true,
lastActiveTimestamp: true,
subscriptionStatus: true,
@ -52,7 +42,7 @@
},
orderBy: {
id: 'desc',
@@ -117,6 +119,7 @@
@@ -117,6 +123,7 @@
mode: 'insensitive',
},
isAdmin: args.isAdmin,