Implement full discord OAuth api flow
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
loading = true;
|
||||
try {
|
||||
const { status } = await api.auth.login.post({ password });
|
||||
const { status } = await api.auth.admin.login.post({ password });
|
||||
|
||||
if (status === 401) {
|
||||
error = "Invalid password";
|
||||
@@ -22,11 +22,9 @@
|
||||
}
|
||||
|
||||
await goto("/");
|
||||
}
|
||||
catch {
|
||||
} catch {
|
||||
error = "Unable to reach the server. Please try again.";
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user