Merge pull request #365 from wasp-lang/update-updateUser-info

remove user lastActiveTimestamp property
This commit is contained in:
Filip Sodić
2025-02-20 15:42:24 +01:00
committed by GitHub
14 changed files with 31 additions and 66 deletions

View File

@@ -18,7 +18,6 @@ entity User {=psl
email String? @unique
username String?
createdAt DateTime @default(now())
lastActiveTimestamp DateTime @default(now())
isAdmin Boolean @default(false)
paymentProcessorUserId String? @unique
lemonSqueezyCustomerPortalUrl String? // You can delete this if you're not using Lemon Squeezy as your payments processor.
@@ -116,7 +115,6 @@ entity User {=psl
email String? @unique
username String?
createdAt DateTime @default(now())
lastActiveTimestamp DateTime @default(now())
isAdmin Boolean @default(false)
//...
psl=}

View File

@@ -79,7 +79,7 @@ Authorization on the server-side is the core of your access control logic, and d
You can authorize access to server-side operations by adding a check for a logged-in user on the `context.user` object which is passed to all operations in Wasp:
```tsx title="src/server/actions.ts"
export const updateCurrentUser: UpdateCurrentUser<...> = async (args, context) => {
export const someServerAction: SomeServerAction<...> = async (args, context) => {
if (!context.user) {
throw new HttpError(401); // throw an error if user is not logged in
}