feat: remove appwrite and add nextjs backend

This commit is contained in:
Elias Schneider
2022-10-09 22:30:32 +02:00
parent 7728351158
commit 4bab33ad8a
153 changed files with 13400 additions and 2811 deletions

View File

@@ -0,0 +1,16 @@
import { CurrentUser } from "../types/user.type";
import api from "./api.service";
import authService from "./auth.service";
const getCurrentUser = async (): Promise<CurrentUser | null> => {
try {
await authService.refreshAccessToken();
return (await api.get("users/me")).data;
} catch {
return null;
}
};
export default {
getCurrentUser,
};