mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
19 lines
440 B
TypeScript
19 lines
440 B
TypeScript
export default defineEventHandler(async (event) => {
|
|
const loginCookie = getCookie(event, "session");
|
|
const lastCheckCookie = getCookie(event, "last_check");
|
|
const nowDate = new Date().toLocaleString();
|
|
try {
|
|
if (loginCookie) {
|
|
deleteCookie(event, "token");
|
|
return {
|
|
success: true,
|
|
error: null,
|
|
};
|
|
}
|
|
} catch (e) {
|
|
return {
|
|
success: false,
|
|
error: e.message,
|
|
};
|
|
}
|
|
});
|