All checks were successful
Deploy Development / deploy (push) Successful in 43s
Test Suite / pytest-backend (push) Successful in 29s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 12s
38 lines
774 B
JavaScript
38 lines
774 B
JavaScript
import { apiFetch } from './client.js'
|
|
|
|
export function fetchMe() {
|
|
return apiFetch('/api/me')
|
|
}
|
|
|
|
export function fetchContext() {
|
|
return apiFetch('/api/me/context')
|
|
}
|
|
|
|
export function fetchEntitlements() {
|
|
return apiFetch('/api/me/entitlements')
|
|
}
|
|
|
|
export function login(email, password) {
|
|
return apiFetch('/api/auth/login', {
|
|
method: 'POST',
|
|
body: JSON.stringify({ email, password }),
|
|
token: null,
|
|
})
|
|
}
|
|
|
|
export function register(payload) {
|
|
return apiFetch('/api/auth/register', {
|
|
method: 'POST',
|
|
body: JSON.stringify(payload),
|
|
token: null,
|
|
})
|
|
}
|
|
|
|
export function logout() {
|
|
return apiFetch('/api/auth/logout', { method: 'POST' })
|
|
}
|
|
|
|
export function fetchSetupStatus() {
|
|
return apiFetch('/api/auth/setup-status', { token: null })
|
|
}
|