Added gitignore
This commit is contained in:
12
vidow-front/src/features/counter/counterAPI.ts
Normal file
12
vidow-front/src/features/counter/counterAPI.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export async function fetchCount(amount = 1): Promise<{ data: number }> {
|
||||
const response = await fetch('/api/counter', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({ amount }),
|
||||
})
|
||||
const result = await response.json()
|
||||
|
||||
return result
|
||||
}
|
Reference in New Issue
Block a user