Move banner system to store, migrate login/register API handling to own file, display Account details on accountPage

This commit is contained in:
2024-09-19 16:20:12 +02:00
parent fbefa52e01
commit 58fcae647a
19 changed files with 250 additions and 141 deletions

View File

@@ -0,0 +1,15 @@
import axios from "axios"
import { AccountModel } from "../models/accountModel"
const BASE_URL = "http://localhost:3000/accounts"
export async function login(username: string, password: string) {
return await axios.post(BASE_URL + "/login", {
username: username,
password: password
})
}
export async function register(account: AccountModel) {
return await axios.post(BASE_URL + "/register", account)
}