brutalism design

This commit is contained in:
2026-05-22 05:08:02 +06:00
parent abf4d41c23
commit e4ed785911
51 changed files with 940 additions and 1171 deletions

View File

@@ -19,9 +19,8 @@ const plugin: FastifyPluginAsyncTypebox = async (fastify) => {
},
async (req, reply) => {
const user = await fastify.prisma.user.findFirst({
where: { username: req.query.username, id: req.query.id },
where: { username: req.query.username },
select: {
id: true,
username: true,
displayName: true,
createdAt: true,
@@ -55,8 +54,8 @@ const plugin: FastifyPluginAsyncTypebox = async (fastify) => {
const user = req.user!
const preferences = await fastify.prisma.userPreferences.upsert({
where: { userId: user.id },
create: { userId: user.id },
where: { username: user.username },
create: { username: user.username },
update: {},
})
@@ -81,9 +80,9 @@ const plugin: FastifyPluginAsyncTypebox = async (fastify) => {
const user = req.user!
return fastify.prisma.userPreferences.upsert({
where: { userId: user.id },
where: { username: user.username },
create: {
userId: user.id,
username: user.username,
...req.body,
},
update: req.body,
@@ -108,12 +107,11 @@ const plugin: FastifyPluginAsyncTypebox = async (fastify) => {
const user = req.user!
const updatedUser = await fastify.prisma.user.update({
where: { id: user.id },
where: { username: user.username },
data: {
displayName: req.body.displayName,
},
select: {
id: true,
username: true,
displayName: true,
createdAt: true,