[go: nahoru, domu]

Skip to content

Commit

Permalink
nextjs 😭
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatXliner committed Feb 27, 2024
1 parent c3e738d commit 50c9f6b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/api/src/router/scouting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,21 @@ export const scoutingRouter = createTRPCRouter({
}),
)
.mutation(async ({ ctx, input }) => {
const { error } = await ctx.supabase
const { error, data } = await ctx.supabase
.from("assignments")
.update({ event_log: input.eventLog })
.eq("match", input.matchKey)
.eq("team", input.team);
.eq("team", input.team)
.select();
if (error !== null) {
throw new TRPCError({
code: "INTERNAL_SERVER_ERROR",
message: "Error updating match log",
cause: error,
});
}

console.log("mutation", data, error, input);
// TODO: Actually return somthing for data
// .where(eq(matches.teamNum, input.teamNum));
}),
getMatchLog: publicProcedure
Expand Down

0 comments on commit 50c9f6b

Please sign in to comment.