add: create, update and login dates in database
This commit is contained in:
@@ -85,7 +85,7 @@ export const actions: Actions = {
|
||||
}
|
||||
|
||||
await db.update(wishlists)
|
||||
.set({ isFavorite: !isFavorite })
|
||||
.set({ isFavorite: !isFavorite, updatedAt: new Date() })
|
||||
.where(eq(wishlists.id, wishlistId));
|
||||
|
||||
return { success: true };
|
||||
@@ -171,7 +171,7 @@ export const actions: Actions = {
|
||||
}
|
||||
|
||||
await db.update(users)
|
||||
.set({ dashboardTheme: theme })
|
||||
.set({ dashboardTheme: theme, updatedAt: new Date() })
|
||||
.where(eq(users.id, session.user.id));
|
||||
|
||||
return { success: true };
|
||||
@@ -187,7 +187,7 @@ export const actions: Actions = {
|
||||
const color = formData.get('color') as string | null;
|
||||
|
||||
await db.update(users)
|
||||
.set({ dashboardColor: color })
|
||||
.set({ dashboardColor: color, updatedAt: new Date() })
|
||||
.where(eq(users.id, session.user.id));
|
||||
|
||||
return { success: true };
|
||||
|
||||
Reference in New Issue
Block a user