You've already forked obsidian-visualiser
Set markdown renderer as client only to fix hydration issues. Will later try to improve it and set it back as normal
This commit is contained in:
16
server/api/users/[id].get.ts
Normal file
16
server/api/users/[id].get.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import useDatabase from "~/composables/useDatabase";
|
||||
import type { User } from "~/types/auth";
|
||||
|
||||
export default defineEventHandler((e) => {
|
||||
const id = getRouterParam(e, 'id');
|
||||
|
||||
if(!id)
|
||||
{
|
||||
setResponseStatus(e, 400);
|
||||
return;
|
||||
}
|
||||
|
||||
const db = useDatabase();
|
||||
|
||||
return db.query(`SELECT id, usernamme, email, state FROM users WHERE id = ?1`).get(id) as User;
|
||||
});
|
||||
Reference in New Issue
Block a user