Skip to content

Commit

Permalink
fix: letter -> later
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-ojha committed May 29, 2022
1 parent 9afb83d commit 903f9bf
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 53 deletions.
1 change: 0 additions & 1 deletion client/src/components/CommentBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
setRootUserProfileDataState,
profilePageDataAction,
} from "../services/redux-actions";
import { instance as axios } from "../services/axios";
import { useState } from "react";
import User_Profile_Icon from "../assets/svg/User_profile_Icon.svg";
import { toastError, toastSuccess, toastWarn } from "../services/toast";
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/FollowedBy.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const FollowedBy = () => {
if (err.response.data.success === false) {
toastError(err.response.data.msg);
} else {
toastError("Some Problem Occur, Please Try again Letter!!!");
toastError("Some Problem Occur, Please Try again later!!!");
}
dispatch(stopProgressBar());
}
Expand Down Expand Up @@ -106,7 +106,7 @@ const FollowedBy = () => {
if (err.response.data.success === false) {
toastError(err.response.data.msg);
} else {
toastError("Some Problem Occur, Please Try again Letter!!!");
toastError("Some Problem Occur, Please Try again later!!!");
}
dispatch(stopProgressBar());
}
Expand Down
13 changes: 0 additions & 13 deletions client/src/components/MessageBox/InnerUserMessageBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,6 @@ const InnerMessageBox = (props) => {
animation: "loadingSpinner 1s linear infinite",
};

useEffect(() => {
// socket.on("send-message-client", (res) => {
// if (res.success !== false) {
// dispatch(
// appendOnMessage({
// ...res.msgInfo,
// _id: `${Math.random()}`,
// })
// );
// }
// });
}, []);

return (
<>
<div className="MessageBox_InnerMessage_Container">
Expand Down
13 changes: 0 additions & 13 deletions client/src/components/MessagePage/InnerUserMessage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,6 @@ const InnerUserMessage = (props) => {
animation: "loadingSpinner 1s linear infinite",
};

useEffect(() => {
// socket.on("send-message-client", (res) => {
// if (res.success !== false) {
// dispatch(
// appendOnMessage({
// ...res.msgInfo,
// _id: `${Math.random()}`,
// })
// );
// }
// });
}, []);

return (
<>
<div className="MessageBox_InnerMessage_Container">
Expand Down
1 change: 0 additions & 1 deletion client/src/components/SideBar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import LogoAndSearchBar from "./LogoAndSearchBar";
import Menu from "./Menu";
import Friends from "./Friends";
import Account from "./Account";
import OpenSideBarDrawerButton from "../OpenSideBarDrawerButton";

const MainPageSideBar = () => {
const dispatch = useDispatch();
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/UserSuggestionComp/SuggestedUser.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const SuggestedUser = (props) => {
if (err.response.data.success === false) {
toastError(err.response.data.msg);
} else {
toastError("Some Problem Occur, Please Try again Letter!!!");
toastError("Some Problem Occur, Please Try again later!!!");
}
dispatch(stopProgressBar());
}
Expand Down Expand Up @@ -97,7 +97,7 @@ const SuggestedUser = (props) => {
if (err.response.data.success === false) {
toastError(err.response.data.msg);
} else {
toastError("Some Problem Occur, Please Try again Letter!!!");
toastError("Some Problem Occur, Please Try again later!!!");
}
dispatch(stopProgressBar());
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/VideoPage/SearchForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const SearchForm = () => {
if (err.response.data.success === false) {
toastError(err.response.data.msg);
} else {
toastError("Some Problem Occur, Please Try again Letter!!!");
toastError("Some Problem Occur, Please Try again later!!!");
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/SignUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const SignUp = () => {
if (err.response.data.success === false) {
toastError(err.response.data.msg);
} else {
toastError("Some Problem Occur, Please Try again Letter!!!");
toastError("Some Problem Occur, Please Try again later!!!");
}
dispatch(stopProgressBar());
}
Expand Down
8 changes: 4 additions & 4 deletions controllers/message.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default {
} catch (err) {
return res
.status(500)
.json({ error: "Server Error!!, Please Try again letter" });
.json({ error: "Server Error!!, Please Try again later" });
}
},
getSingleUserMessage: async (
Expand Down Expand Up @@ -186,7 +186,7 @@ export default {
} catch (err) {
return res.status(500).json(<ResponseObject>{
success: false,
msg: "Server Error!!, Please Try again letter",
msg: "Server Error!!, Please Try again later",
});
}
},
Expand Down Expand Up @@ -281,7 +281,7 @@ export default {
} catch (err) {
return res.status(500).json(<ResponseObject>{
success: false,
msg: "Server Error!!, Please Try again letter",
msg: "Server Error!!, Please Try again later",
});
}
},
Expand Down Expand Up @@ -355,7 +355,7 @@ export default {
} catch (err) {
return res
.status(500)
.json({ error: "Server Error!!, Please Try again letter" });
.json({ error: "Server Error!!, Please Try again later" });
}
},
};
8 changes: 4 additions & 4 deletions controllers/post.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default {
if (!removeLikedPostRes) {
return res.status(500).json(<ResponseObject>{
success: false,
msg: "server Error, Please try again letter!!!",
msg: "server Error, Please try again later!!!",
});
}
return res.status(200).json(<ResponseObject>{
Expand Down Expand Up @@ -117,7 +117,7 @@ export default {
if (!likePostRes) {
return res.status(500).json(<ResponseObject>{
success: false,
msg: "server Error, Please try again letter!!!",
msg: "server Error, Please try again later!!!",
});
}
return res.status(200).json(<ResponseObject>{
Expand All @@ -129,7 +129,7 @@ export default {
} catch (err) {
return res.status(500).json(<ResponseObject>{
success: false,
msg: "server Error, Please try again letter!!!",
msg: "server Error, Please try again later!!!",
});
}
},
Expand Down Expand Up @@ -187,7 +187,7 @@ export default {
} catch (err) {
return res.status(500).json(<ResponseObject>{
success: false,
msg: "Server Error, Please try again Letter...",
msg: "Server Error, Please try again later...",
});
}
},
Expand Down
10 changes: 5 additions & 5 deletions controllers/setting.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default {
} catch (err) {
return res.status(500).json(<ResponseObject>{
success: false,
msg: "server Error, Please try again letter!!!",
msg: "server Error, Please try again later!!!",
});
}
},
Expand Down Expand Up @@ -104,12 +104,12 @@ export default {
}
return res.status(500).json(<ResponseObject>{
success: false,
msg: "server Error, Please try again letter!!!",
msg: "server Error, Please try again later!!!",
});
} catch (err) {
return res.status(500).json(<ResponseObject>{
success: false,
msg: "server Error, Please try again letter!!!",
msg: "server Error, Please try again later!!!",
});
}
},
Expand Down Expand Up @@ -137,12 +137,12 @@ export default {
}
return res.status(500).json(<ResponseObject>{
success: false,
msg: "server Error, Please try again letter!!!",
msg: "server Error, Please try again later!!!",
});
} catch (err) {
return res.status(500).json(<ResponseObject>{
success: false,
msg: "server Error, Please try again letter!!!",
msg: "server Error, Please try again later!!!",
});
}
},
Expand Down
4 changes: 2 additions & 2 deletions controllers/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ export default {
} catch (err) {
return res.status(500).json(<ResponseObject>{
success: false,
msg: "Server Error, Please Try again letter",
msg: "Server Error, Please Try again later",
});
}
},
Expand All @@ -423,7 +423,7 @@ export default {
} catch (err) {
return res.status(500).json({
success: false,
error: "Server Error!!, Please Try again letter",
error: "Server Error!!, Please Try again later",
});
}
},
Expand Down
9 changes: 5 additions & 4 deletions middleware/authenticate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,20 @@ const authenticate: RequestHandler = async (
}
);
if (!rootUser) {
throw new Error("User not found");
return res.status(401).send(<ResponseObject>{
success: false,
msg: "User not found, sorry not a valid token",
});
}
req.token = token;
req.rootUser = rootUser;
req.userID = <any>rootUser._id;
// req.userID = rootUser.id;
next();
} catch (err) {
return res.status(401).send(<ResponseObject>{
success: false,
msg: "UnAuthorized: No token provided, Please Login first",
msg: "UnAuthorized: no token provided, please login first",
});
// console.log(err);
}
};

Expand Down

1 comment on commit 903f9bf

@roman-ojha
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for social ready!

✅ Preview
https://social-5h57n7a6l-razzroman98-gmailcom.vercel.app
https://rsocial.vercel.app

Built with commit 903f9bf.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.