mirror of
https://github.com/rjNemo/meal_planner
synced 2026-06-11 04:46:39 +00:00
chore: lint
This commit is contained in:
parent
a75ee69b94
commit
fbf840d448
3 changed files with 3 additions and 5 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue