1
0
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:
2023-12-05 23:51:41 +01:00
parent 0c207bea3c
commit 2a6480e2f1

3
lib/fetcher.ts Normal file
View 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})));