Skip to content

Commit

Permalink
Fix save.js (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
BliiTzZ authored Mar 2, 2022
1 parent dc7a5bc commit 3ccafed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/auth/save.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import * as api from '$lib/api.js';
import { respond } from './_respond';

export async function post({ body: user, locals }) {
export async function post({ request, locals }) {
if (!locals.user) {
return {
status: 401
};
}

const user = await request.json();
const { token } = locals.user;
const body = await api.put(
'user',
Expand Down

1 comment on commit 3ccafed

@vercel
Copy link

@vercel vercel bot commented on 3ccafed Mar 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.