вложения, канальчики, бим-бим + бам-бам
This commit is contained in:
@@ -16,7 +16,7 @@ export const useAuth = createGlobalState(() => {
|
||||
|
||||
async function login(username: string, password: string): Promise<void> {
|
||||
try {
|
||||
const result = await chadApi<Me>('/login', {
|
||||
const result = await chadApi<Me>('/auth/login', {
|
||||
method: 'POST',
|
||||
body: {
|
||||
username,
|
||||
@@ -33,7 +33,7 @@ export const useAuth = createGlobalState(() => {
|
||||
|
||||
async function register(username: string, password: string): Promise<void> {
|
||||
try {
|
||||
const result = await chadApi<Me>('/register', {
|
||||
const result = await chadApi<Me>('/auth/register', {
|
||||
method: 'POST',
|
||||
body: {
|
||||
username,
|
||||
@@ -50,7 +50,7 @@ export const useAuth = createGlobalState(() => {
|
||||
|
||||
async function logout(): Promise<void> {
|
||||
try {
|
||||
await chadApi('/logout', { method: 'POST' })
|
||||
await chadApi('/auth/logout', { method: 'POST' })
|
||||
|
||||
setMe(undefined)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user