mirror of
https://github.com/Fayorg/calendrier-avant.git
synced 2026-05-27 17:18:38 +02:00
add: added fetcher for swr
This commit is contained in:
3
lib/fetcher.ts
Normal file
3
lib/fetcher.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { stat } from "fs";
|
||||
|
||||
export const fetcher = (input: URL | RequestInfo, init?: RequestInit | undefined) => fetch(input, init).then(res => res.json().then(data => ({...data, status: res.status})));
|
||||
Reference in New Issue
Block a user