Skip to content

Commit

Permalink
refactor: move errors to /utils dir
Browse files Browse the repository at this point in the history
  • Loading branch information
moonlitgrace committed Dec 9, 2024
1 parent ba68768 commit 0071096
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/lib/utils/api.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PUBLIC_API_URL } from '$env/static/public';
import { AuthError } from '$lib/errors/auth';
import { AuthError } from '$lib/utils/errors';

/**
* A utility function to make API requests.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion frontend/src/routes/auth/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { dev } from '$app/environment';
import { fail } from '@sveltejs/kit';
import type { Actions } from './$types';
import { apiFetch } from '$lib/utils/api';
import { isAuthError } from '$lib/errors/auth';
import { isAuthError } from '$lib/utils/errors';

export const actions = {
login: async ({ request, cookies }) => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/settings/profile/+page.server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isAuthError } from '$lib/errors/auth';
import { isAuthError } from '$lib/utils/errors';
import { apiFetch } from '$lib/utils/api';
import { fail } from '@sveltejs/kit';
import type { Actions } from './$types';
Expand Down

0 comments on commit 0071096

Please sign in to comment.