mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
feat: add user API service
This commit is contained in:
parent
42a585d880
commit
8c5ecfd4e4
1 changed files with 13 additions and 0 deletions
13
surfsense_web/lib/apis/user-api.service.ts
Normal file
13
surfsense_web/lib/apis/user-api.service.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { getMeResponse } from "@/contracts/types/user.types";
|
||||
import { baseApiService } from "./base-api.service";
|
||||
|
||||
class UserApiService {
|
||||
/**
|
||||
* Get current authenticated user
|
||||
*/
|
||||
getMe = async () => {
|
||||
return baseApiService.get(`/users/me`, getMeResponse);
|
||||
};
|
||||
}
|
||||
|
||||
export const userApiService = new UserApiService();
|
||||
Loading…
Add table
Add a link
Reference in a new issue