You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
318 B
TypeScript
11 lines
318 B
TypeScript
import { AuthService } from '~/services/authService';
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
// TODO 调用API清除jwt授权
|
|
const config = useRuntimeConfig()
|
|
await AuthService.logout();
|
|
// 清除 Cookie
|
|
deleteCookie(event, config.public.cookieName)
|
|
|
|
return { success: true }
|
|
}) |