init portal

This commit is contained in:
2025-12-24 22:49:39 +08:00
parent 91fd3c4ac2
commit 365427c851
119 changed files with 29103 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import { requestJson, setPortalAuthToken } from './apiClient';
export async function register({ username, password, confirmPassword, verifyCode }) {
const data = await requestJson('/v1/auth/register', {
method: 'POST',
body: { username, password, confirmPassword, verifyCode }
});
const token = data?.token ?? '';
if (token) setPortalAuthToken(token);
return token;
}