MCPcopy Create free account
hub / github.com/Jenifer2833/fullstack-chat-app / logout

Function logout

backend/src/controllers/auth.controller.js:79–87  ·  view source on GitHub ↗
(req,res)

Source from the content-addressed store, hash-verified

77};
78
79export const logout= (req,res)=>{
80 try{
81 res.cookie("jwt","",{maxAge:0});
82 res.status(200).json({message:"Logged Out successfully"});
83 }catch(error){
84 console.log("Error in logout controller", error.message);
85 res.status(500).json({message:"Internal Server Error"});
86 }
87};
88
89export const updateProfile= async(req,res)=>{
90 try{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected