npm update, added email field

This commit is contained in:
2024-10-27 17:48:04 +01:00
parent 7db2ba322c
commit 446e049e6e
3 changed files with 29 additions and 24 deletions

View File

@ -2,9 +2,9 @@ import axios from 'axios'
import config from '@/config'
import { useCookies } from '@vueuse/integrations/useCookies'
export async function register(username: string, password: string) {
export async function register(username: string, email: string, password: string) {
try {
const response = await axios.post(`${config.server_endpoint}/register`, { username, password })
const response = await axios.post(`${config.server_endpoint}/register`, { username, email, password })
useCookies().set('token', response.data.token as string)
return { success: true, token: response.data.token }
} catch (error: any) {