16 lines
342 B
TypeScript
16 lines
342 B
TypeScript
import {
|
|
clearRefreshTokenCookie,
|
|
getRefreshTokenFromCookie,
|
|
} from '~/utils/cookie-utils';
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
const refreshToken = getRefreshTokenFromCookie(event);
|
|
if (!refreshToken) {
|
|
return useResponseSuccess('');
|
|
}
|
|
|
|
clearRefreshTokenCookie(event);
|
|
|
|
return useResponseSuccess('');
|
|
});
|