@@ -6,7 +6,7 @@ import { useParams, useRouter } from "next/navigation";
66import { LogOut , Plus , PlayCircle , BookOpen } from "lucide-react" ;
77import formatDate from "@/app/utils/formatDate" ;
88import Loader from "@/app/_components/Loader" ;
9- import { authenticatedFetch } from "@/app/utils/api" ;
9+ import { authenticatedFetchV2 } from "@/app/utils/api" ;
1010import { Card , CreateCard , PSDetails } from "./_components" ;
1111
1212// Main App
@@ -56,7 +56,7 @@ export default function NotebookDashboard() {
5656 setLoadingNotebooks ( true ) ;
5757 setNotebooksError ( null ) ;
5858 try {
59- const data = await authenticatedFetch ( "/api/v1/notebooks" , {
59+ const data = await authenticatedFetchV2 ( "/api/v1/notebooks" , {
6060 method : "GET" ,
6161 signal : controller . signal ,
6262 } ) ;
@@ -92,7 +92,7 @@ export default function NotebookDashboard() {
9292 setLoadingProblem ( true ) ;
9393 setProblemError ( null ) ;
9494 try {
95- const data = await authenticatedFetch (
95+ const data = await authenticatedFetchV2 (
9696 `/api/v1/problems/${ routeProblemId } ` ,
9797 {
9898 method : "GET" ,
@@ -143,7 +143,7 @@ export default function NotebookDashboard() {
143143 : null ,
144144 } ;
145145
146- const created = await authenticatedFetch ( "/api/v1/notebooks" , {
146+ const created = await authenticatedFetchV2 ( "/api/v1/notebooks" , {
147147 method : "POST" ,
148148 body : JSON . stringify ( payload ) ,
149149 } ) ;
@@ -191,7 +191,7 @@ export default function NotebookDashboard() {
191191 }
192192
193193 try {
194- await authenticatedFetch ( `/api/v1/notebooks/${ notebookId } ` , {
194+ await authenticatedFetchV2 ( `/api/v1/notebooks/${ notebookId } ` , {
195195 method : "PUT" ,
196196 body : JSON . stringify ( { title : newName } ) ,
197197 } ) ;
@@ -220,7 +220,7 @@ export default function NotebookDashboard() {
220220 }
221221
222222 try {
223- await authenticatedFetch ( `/api/v1/notebooks/${ notebookId } ` , {
223+ await authenticatedFetchV2 ( `/api/v1/notebooks/${ notebookId } ` , {
224224 method : "DELETE" ,
225225 } ) ;
226226
0 commit comments