Move software files one directory up, Readme

This commit is contained in:
2024-11-19 16:51:28 +01:00
parent 9fa2b753ec
commit b347df7c6e
329 changed files with 255 additions and 31 deletions

30
src/data/api/mainApi.ts Normal file
View File

@@ -0,0 +1,30 @@
import axios from "axios"
const BASE_URL = "http://localhost:3000/api"
/**
* Fetch the current state of backend server
*
* @returns Response from server
*/
export function fetchServerState() {
return axios.get(BASE_URL)
}
/**
* Reset the database (without exercise progress) to factory state
*
* @returns Response from server
*/
export function resetDatabase() {
return axios.get(BASE_URL + "/resetdatabase")
}
/**
* Reset the exercise progress
*
* @returns Response from server
*/
export function resetExerciseProgress() {
return axios.get(BASE_URL + "/resetExerciseProgress")
}