mirror of
https://github.com/kou029w/_.git
synced 2025-01-31 06:18:07 +00:00
10 lines
329 B
TypeScript
10 lines
329 B
TypeScript
import { defineController } from './$relay'
|
|
import { getUserInfoById, changeIcon } from '$/service/user'
|
|
|
|
export default defineController(() => ({
|
|
get: ({ user }) => ({ status: 200, body: getUserInfoById(user.id) }),
|
|
post: async ({ user, body }) => ({
|
|
status: 201,
|
|
body: await changeIcon(user.id, body.icon)
|
|
})
|
|
}))
|