some module updates
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
import { json } from "@sveltejs/kit";
|
||||
import jwt from "jsonwebtoken";
|
||||
import { json } from '@sveltejs/kit';
|
||||
import jwt from 'jsonwebtoken';
|
||||
|
||||
export async function POST() {
|
||||
const token = await jwt.sign({
|
||||
id: 'sample-id',
|
||||
secret: 'secret'
|
||||
},"shhhhh");
|
||||
const token = await jwt.sign(
|
||||
{
|
||||
id: 'sample-id',
|
||||
secret: 'secret'
|
||||
},
|
||||
'shhhhh'
|
||||
);
|
||||
return json({ token });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user