aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/api.js
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-08-01 17:49:26 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-08-01 17:49:26 +0530
commitbd933a5aace3ac4944bfe7f4b58b4908978b4950 (patch)
treeb738f4c68d897c009ba7823d0e99f1f6b44a611d /src/utils/api.js
parentfb04271b5288e8fb5891b7d6326f4806d12b82d5 (diff)
downloadadmin-panel-bd933a5aace3ac4944bfe7f4b58b4908978b4950.tar.gz
admin-panel-bd933a5aace3ac4944bfe7f4b58b4908978b4950.tar.bz2
admin-panel-bd933a5aace3ac4944bfe7f4b58b4908978b4950.zip
merge
Diffstat (limited to 'src/utils/api.js')
-rw-r--r--src/utils/api.js21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/utils/api.js b/src/utils/api.js
deleted file mode 100644
index 7b63aa4..0000000
--- a/src/utils/api.js
+++ /dev/null
@@ -1,21 +0,0 @@
-export const fetchAds = async () => {
- const response = await fetch('http://localhost:5000/ads');
- if (!response.ok) {
- throw new Error('Network response was not ok');
- }
- return response.json();
-};
-
-export const addAd = async (ad) => {
- const response = await fetch('http://localhost:5000/ads', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify(ad),
- });
- if (!response.ok) {
- throw new Error('Network response was not ok');
- }
- return response.json();
-};