forked from github/plane
b406a70e72
Co-authored-by: Sainath <sainath@Sainaths-MacBook-Pro.local>
19 lines
418 B
TypeScript
19 lines
418 B
TypeScript
// services
|
|
import APIService from "services/api.service";
|
|
|
|
class UserService extends APIService {
|
|
constructor() {
|
|
super(process.env.NEXT_PUBLIC_API_BASE_URL || "http://localhost:8000");
|
|
}
|
|
|
|
async currentUser(): Promise<any> {
|
|
return this.get("/api/users/me/")
|
|
.then((response) => response?.data)
|
|
.catch((error) => {
|
|
throw error?.response;
|
|
});
|
|
}
|
|
}
|
|
|
|
export default UserService;
|