mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
fix(server): redirect to setup page if not initialized (#7875)
This commit is contained in:
@@ -52,14 +52,14 @@ export function Auth() {
|
||||
)
|
||||
.then(res => res.json())
|
||||
.then(
|
||||
({
|
||||
async ({
|
||||
data: {
|
||||
currentUser: { features },
|
||||
},
|
||||
}) => {
|
||||
if (features.includes(FeatureType.Admin)) {
|
||||
toast.success('Logged in successfully');
|
||||
revalidate();
|
||||
await revalidate();
|
||||
} else {
|
||||
toast.error('You are not an admin');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user