Skip to content

Commit

Permalink
optimize : types import
Browse files Browse the repository at this point in the history
  • Loading branch information
Liry24 committed Jan 27, 2025
1 parent f8ebd3d commit 1cd7055
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion composables/setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ApiResponse } from '@UI/types/types';
import type { ApiResponse } from '#types';

export const useDeleteSetup = async (id: number) => {
const { error } = await $fetch<ApiResponse<{ id: number }>>('/api/setup', {
Expand Down
2 changes: 1 addition & 1 deletion server/api/image.delete.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { serverSupabaseUser } from '#supabase/server';
import { createStorage } from 'unstorage';
import s3Driver from 'unstorage/drivers/s3';
import type { ApiResponse } from '~/types/types';
import type { ApiResponse } from '~/types';

const runtime = useRuntimeConfig();

Expand Down
2 changes: 1 addition & 1 deletion server/api/image.put.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import sharp from 'sharp';
import { createStorage } from 'unstorage';
import s3Driver from 'unstorage/drivers/s3';
import { serverSupabaseUser } from '#supabase/server';
import type { ApiResponse } from '~/types/types';
import type { ApiResponse } from '~/types';

export interface RequestBody {
image: string;
Expand Down
2 changes: 1 addition & 1 deletion server/api/item/booth.get.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { serverSupabaseClient } from '#supabase/server';
import type { H3Event } from 'h3';
import type { Item, ApiResponse } from '~/types/types';
import type { Item, ApiResponse } from '~/types';

interface fetchedItem extends Omit<Item, 'updated_at'> {
tags: string[];
Expand Down
2 changes: 1 addition & 1 deletion server/api/setup.delete.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { serverSupabaseClient, serverSupabaseUser } from '#supabase/server';
import type { ApiResponse } from '~/types/types';
import type { ApiResponse } from '~/types';

export interface RequestBody {
id: number;
Expand Down
2 changes: 1 addition & 1 deletion server/api/setup.get.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { serverSupabaseClient } from '#supabase/server';
import type { ApiResponse, SetupClient } from '~/types/types';
import type { ApiResponse, SetupClient } from '~/types';

export interface RequestQuery {
id: number;
Expand Down
2 changes: 1 addition & 1 deletion server/api/setup.put.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { serverSupabaseClient, serverSupabaseUser } from '#supabase/server';
import type { ApiResponse } from '~/types/types';
import type { ApiResponse } from '~/types';
import getErrors, { type ErrorType } from '~/utils/getErrors';

export interface RequestBody {
Expand Down
2 changes: 1 addition & 1 deletion server/api/setups/bookmarks.get.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { serverSupabaseClient, serverSupabaseUser } from '#supabase/server';
import type { ApiResponse, SetupClient, SetupDB } from '~/types/types';
import type { ApiResponse, SetupClient, SetupDB } from '~/types';
import setupMoldingClient from '~/utils/setupMoldingClient';

interface RequestQuery {
Expand Down
2 changes: 1 addition & 1 deletion server/api/setups/latest.get.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { serverSupabaseClient } from '#supabase/server';
import type { ApiResponse, SetupClient } from '~/types/types';
import type { ApiResponse, SetupClient } from '~/types';
import setupMoldingClient from '~/utils/setupMoldingClient';

interface RequestQuery {
Expand Down
2 changes: 1 addition & 1 deletion server/api/setups/user.get.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { serverSupabaseClient } from '#supabase/server';
import type { ApiResponse, SetupClient } from '~/types/types';
import type { ApiResponse, SetupClient } from '~/types';
import setupMoldingClient from '~/utils/setupMoldingClient';

interface RequestQuery {
Expand Down
2 changes: 1 addition & 1 deletion server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "../.nuxt/tsconfig.server.json"
"extends": "../.nuxt/tsconfig.server.json"
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json",
"compilerOptions": {
"paths": { "@UI/*": ["./*"] },
"paths": { "#types": ["./types"] },

"lib": ["ESNext", "DOM"],
"target": "ESNext",
Expand Down
File renamed without changes.

0 comments on commit 1cd7055

Please sign in to comment.