mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
Remove VITE_SERVER_ENDPOINT dependency (#428)
* Move backend api to its own instance * Remove external fetch hook * Added endpoint for album * Added endpoint for admin page * Make request directly to immich-server * Refactor unsued code
This commit is contained in:
15
web/src/routes/data/user/get-my-user-info.ts
Normal file
15
web/src/routes/data/user/get-my-user-info.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { serverApi, UserResponseDto } from '@api';
|
||||
import type { RequestHandlerOutput } from '@sveltejs/kit';
|
||||
|
||||
export const GET = async (): Promise<RequestHandlerOutput<UserResponseDto>> => {
|
||||
try {
|
||||
const { data } = await serverApi.userApi.getMyUserInfo();
|
||||
return {
|
||||
body: data
|
||||
};
|
||||
} catch {
|
||||
return {
|
||||
status: 500
|
||||
};
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user