more type cleanup
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { AccountWithMembers } from '~~/lib/services/service.types';
|
import { type AccountWithMembers } from '~~/lib/services/service.types';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { join_password }: { join_password?: string } = route.params;
|
const { join_password }: { join_password?: string } = route.params;
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
import { EventHandler, EventHandlerRequest, H3Event, eventHandler } from 'h3';
|
import {
|
||||||
|
type EventHandler,
|
||||||
|
type EventHandlerRequest,
|
||||||
|
H3Event,
|
||||||
|
eventHandler
|
||||||
|
} from 'h3';
|
||||||
|
|
||||||
export const defineProtectedEventHandler = <T extends EventHandlerRequest>(
|
export const defineProtectedEventHandler = <T extends EventHandlerRequest>(
|
||||||
handler: EventHandler<T>
|
handler: EventHandler<T>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { inferAsyncReturnType } from '@trpc/server';
|
import type { inferAsyncReturnType } from '@trpc/server';
|
||||||
import { H3Event } from 'h3';
|
import { H3Event } from 'h3';
|
||||||
|
|
||||||
export async function createContext(event: H3Event) {
|
export async function createContext(event: H3Event) {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { TRPCError } from '@trpc/server';
|
import { TRPCError } from '@trpc/server';
|
||||||
|
import { setCookie } from 'h3';
|
||||||
import {
|
import {
|
||||||
router,
|
router,
|
||||||
adminProcedure,
|
adminProcedure,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
* @see https://trpc.io/docs/v10/procedures
|
* @see https://trpc.io/docs/v10/procedures
|
||||||
*/
|
*/
|
||||||
import { initTRPC, TRPCError } from '@trpc/server';
|
import { initTRPC, TRPCError } from '@trpc/server';
|
||||||
import { Context } from './context';
|
import type { Context } from './context';
|
||||||
import { ACCOUNT_ACCESS } from '~~/prisma/account-access-enum';
|
import { ACCOUNT_ACCESS } from '~~/prisma/account-access-enum';
|
||||||
import superjson from 'superjson';
|
import superjson from 'superjson';
|
||||||
import { AccountLimitError } from '~~/lib/services/errors';
|
import { AccountLimitError } from '~~/lib/services/errors';
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import { ACCOUNT_ACCESS } from '~~/prisma/account-access-enum';
|
import { ACCOUNT_ACCESS } from '~~/prisma/account-access-enum';
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { FullDBUser, MembershipWithUser } from '~~/lib/services/service.types';
|
import type {
|
||||||
|
FullDBUser,
|
||||||
|
MembershipWithUser
|
||||||
|
} from '~~/lib/services/service.types';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This store manages User and Account state including the ActiveAccount
|
This store manages User and Account state including the ActiveAccount
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Note } from '.prisma/client';
|
import type { Note } from '.prisma/client';
|
||||||
import { defineStore, storeToRefs } from 'pinia';
|
import { defineStore, storeToRefs } from 'pinia';
|
||||||
import { Ref } from 'vue';
|
import type { Ref } from 'vue';
|
||||||
|
|
||||||
export const useNotesStore = defineStore('notes', () => {
|
export const useNotesStore = defineStore('notes', () => {
|
||||||
const accountStore = useAccountStore();
|
const accountStore = useAccountStore();
|
||||||
|
|||||||
Reference in New Issue
Block a user