chore: lint

This commit is contained in:
Ruidy 2024-12-13 22:39:14 +01:00
parent a75ee69b94
commit fbf840d448
No known key found for this signature in database
GPG key ID: E00F51288CB857CC
3 changed files with 3 additions and 5 deletions

View file

@ -49,7 +49,7 @@ const handleRandomClick = async () => {
</ul>
</div>
<div class="navbar-end">
<button @click="handleRandomClick" class="btn btn-primary">Random</button>
<button class="btn btn-primary" @click="handleRandomClick">Random</button>
</div>
</nav>
</template>

View file

@ -24,7 +24,6 @@ const {
} = id === "random" ? await useRecipeRandom() : await useRecipeById(Number(id));
if (error.value) {
let statusCode = 400;
if (error.value.message === "Recipe not found") {
throw createError({
statusCode: 404,
@ -33,7 +32,7 @@ if (error.value) {
}
throw createError({
statusCode,
statusCode: 400,
statusMessage: "Invalid recipe id",
message: error.value.message,
});

View file

@ -1,6 +1,5 @@
import { initTRPC } from "@trpc/server";
import { initTRPC , TRPCError } from "@trpc/server";
import type { Context } from "~/server/trpc/context";
import { TRPCError } from "@trpc/server";
// import { authMiddleware } from "~/server/trpc/middleware";
const t = initTRPC.context<Context>().create();