Skip to content

Commit

Permalink
testing removing api
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewThien committed Aug 2, 2024
1 parent 5332a68 commit cd22c68
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/api/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<link rel="stylesheet" href="{% static 'style/custom.css' %}?rnd=192">

<!-- favicon -->
<link rel="shortcut icon" type="image/png" href="{% static 'images/favicon.png' %}" >
<link rel="shortcut icon" type="image/png" href="{% static 'images/favicon.ico' %}" >

<!-- JQuerry -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
Expand Down
4 changes: 3 additions & 1 deletion app/next-client-app/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use server";
import request from "@/lib/api/request";
import { redirect } from "next/navigation";

const fetchKeys = {
specificUser: () => `userspecific`,
Expand All @@ -9,6 +10,7 @@ export async function getUser(): Promise<User[]> {
try {
return await request<User[]>(fetchKeys.specificUser());
} catch (error) {
return [];
console.log("dasd");
redirect("/accounts/login/");
}
}
2 changes: 1 addition & 1 deletion app/next-client-app/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default async function RootLayout({
}: Readonly<{
children: React.ReactNode;
}>) {
const user = await getUser();
// const user = await getUser();

return (
<html lang="en">
Expand Down

0 comments on commit cd22c68

Please sign in to comment.