mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-11-04 08:10:28 +09:00
SSR을 비활성화하여 SPA로 전환
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b35585c7bb
commit
35f3e92b5a
34 files changed
+152
-139
No files matched your search
@@ -2,7 +2,7 @@ import { trpc } from "$trpc/client";
|
||||
|
||||
export const requestPasswordChange = async (oldPassword: string, newPassword: string) => {
|
||||
try {
|
||||
await trpc().auth.changePassword.mutate({ oldPassword, newPassword });
|
||||
await trpc.auth.changePassword.mutate({ oldPassword, newPassword });
|
||||
return true;
|
||||
} catch {
|
||||
// TODO: Error Handling
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import { redirect } from "@sveltejs/kit";
|
||||
import type { PageServerLoad } from "./$types";
|
||||
|
||||
export const load: PageServerLoad = async ({ locals, url }) => {
|
||||
const redirectPath = url.searchParams.get("redirect") || "/home";
|
||||
|
||||
if (locals.session) {
|
||||
redirect(302, redirectPath);
|
||||
}
|
||||
|
||||
return { redirectPath };
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export const load: PageLoad = async ({ url }) => {
|
||||
const redirectPath = url.searchParams.get("redirect") || "/home";
|
||||
return { redirectPath };
|
||||
};
|
||||
@@ -9,7 +9,7 @@ export {
|
||||
|
||||
export const requestLogin = async (email: string, password: string) => {
|
||||
try {
|
||||
await trpc().auth.login.mutate({ email, password });
|
||||
await trpc.auth.login.mutate({ email, password });
|
||||
return true;
|
||||
} catch {
|
||||
// TODO: Error Handling
|
||||
|
||||
Reference in new issue
Block a user