added comments

This commit is contained in:
Altair-sh
2026-09-04 19:36:12 +02:00
parent 95880ca080
commit 0ecac6533c
17 changed files with 68 additions and 29 deletions
+3
View File
@@ -3,11 +3,13 @@
class AuthService {
private API_BASE = '/api/auth'
// Hashes the password before sending it to the backend
private hashPassword(password: string) {
// TODO: password hashing
return password
}
// Logs in with email and password, returning the parsed JSON response.
async login(email: string, password: string) {
const response = await fetch(`${this.API_BASE}/login`, {
method: 'POST',
@@ -25,6 +27,7 @@ class AuthService {
return await response.json()
}
// Registers a new user, returning the parsed JSON response.
async register(name: string, email: string, password: string) {
const response = await fetch(`${this.API_BASE}/register`, {
method: 'POST',