mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-11 15:16:28 +08:00
fix(admin): unable to log into admin panel (#11451)
This commit is contained in:
@@ -11,6 +11,7 @@ import { useCallback, useEffect, useState } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
import { affineFetch } from '../../fetch-utils';
|
||||
import { useRevalidateServerConfig, useServerConfig } from '../common';
|
||||
import { CreateAdmin } from './create-admin';
|
||||
|
||||
@@ -95,7 +96,7 @@ export const Form = () => {
|
||||
|
||||
const createAdmin = useCallback(async () => {
|
||||
try {
|
||||
const createResponse = await fetch('/api/setup/create-admin-user', {
|
||||
const createResponse = await affineFetch('/api/setup/create-admin-user', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
email: emailValue,
|
||||
|
||||
Reference in New Issue
Block a user