use const

This commit is contained in:
Daniel Flanagan 2024-01-08 15:23:46 -06:00
parent 324469259d
commit 041fd8bb21
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4

View file

@ -56,7 +56,9 @@ export const handler: Handlers<User | null> = {
},
async PUT(req, _ctx) {
// TODO: form or json
let model = UserModel.omit({ createdAt: true }).partial({ avatarUrl: true })
const model = UserModel.omit({ createdAt: true }).partial({
avatarUrl: true,
})
let user: z.infer<typeof model>
let redirectInstead = false
if (req.headers.get('content-type')?.includes('json')) {