drop theme from users table

This commit is contained in:
keyan 2022-01-14 09:33:43 -06:00
parent 5a4c249a74
commit ccc1251f7e
5 changed files with 8 additions and 13 deletions

View File

@ -95,15 +95,6 @@ export default {
return true return true
}, },
setTheme: async (parent, { theme }, { me, models }) => {
if (!me) {
throw new AuthenticationError('you must be logged in')
}
await models.user.update({ where: { id: me.id }, data: { theme } })
return true
},
upsertBio: async (parent, { bio }, { me, models }) => { upsertBio: async (parent, { bio }, { me, models }) => {
if (!me) { if (!me) {
throw new AuthenticationError('you must be logged in') throw new AuthenticationError('you must be logged in')

View File

@ -17,7 +17,6 @@ export default gql`
extend type Mutation { extend type Mutation {
setName(name: String!): Boolean setName(name: String!): Boolean
setSettings(tipDefault: Int!): Boolean setSettings(tipDefault: Int!): Boolean
setTheme(theme: String!): Boolean
upsertBio(bio: String!): User! upsertBio(bio: String!): User!
setWalkthrough(tipPopover: Boolean, upvotePopover: Boolean): Boolean setWalkthrough(tipPopover: Boolean, upvotePopover: Boolean): Boolean
} }
@ -37,7 +36,6 @@ export default gql`
bio: Item bio: Item
sats: Int! sats: Int!
msats: Int! msats: Int!
theme: String!
upvotePopover: Boolean! upvotePopover: Boolean!
tipPopover: Boolean! tipPopover: Boolean!
} }

View File

@ -17,7 +17,6 @@ export const ME = gql`
id id
} }
hasInvites hasInvites
theme
upvotePopover upvotePopover
tipPopover tipPopover
} }

View File

@ -0,0 +1,8 @@
/*
Warnings:
- You are about to drop the column `theme` on the `users` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "users" DROP COLUMN "theme";

View File

@ -35,7 +35,6 @@ model User {
checkedNotesAt DateTime? checkedNotesAt DateTime?
tipDefault Int @default(1) tipDefault Int @default(1)
pubkey String? @unique pubkey String? @unique
theme String @default("light")
upvotePopover Boolean @default(false) upvotePopover Boolean @default(false)
tipPopover Boolean @default(false) tipPopover Boolean @default(false)