Spaces:
Paused
Paused
File size: 323 Bytes
3c3f089 |
1 2 3 4 5 6 7 8 9 10 11 |
import { withSessionApiRoute } from "../../utils/withSession";
export default withSessionApiRoute(async (req, res) => {
try {
req.session.destroy();
res.json({ isLoggedIn: false, code: 200, message: "logout successfully" });
} catch (error: any) {
res.status(500).json({ message: error.message });
}
});
|