mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
96399c7112
* feat: filters in plane deploy implemented multi-level dropdown for plane deploy * style: spacing and fonts * feat: plane deploy implemented authentication/theming, created/modified all the required store & services * devL reactions, voting, comments and theme
27 lines
628 B
TypeScript
27 lines
628 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;
|
|
});
|
|
}
|
|
|
|
async updateMe(data: any): Promise<any> {
|
|
return this.patch("/api/users/me/", data)
|
|
.then((response) => response?.data)
|
|
.catch((error) => {
|
|
throw error?.response?.data;
|
|
});
|
|
}
|
|
}
|
|
|
|
export default UserService;
|