Conversation
…ya/emailFrequency
…ya/timeZoneSettings
…ya/emailFrequency
…imeOut into notifications-preferences
Shira-Abrams
left a comment
There was a problem hiding this comment.
fiex the commen and inform me please when you finish
client-side/src/App.jsx
Outdated
| const { i18n } = useTranslation(); | ||
|
|
||
| useEffect(()=>{ | ||
| const user={ |
There was a problem hiding this comment.
retreive user from redux
|
|
||
|
|
||
|
|
||
| const Messages = ({ currentUser, onUpdate }) => { |
There was a problem hiding this comment.
retrive current user from redux
| Object.entries(messagesData).forEach(([key, value]) => { | ||
| formData.append(key, value); | ||
| }); | ||
|
|
There was a problem hiding this comment.
where did you send the data to the server ?
| REACT_APP_BASE_URL='http://localhost:3000' | ||
| REACT_APP_SECRET_CODE_CAPVAL='6Ld5uBoqAAAAAKwPXqo5eanm9ZFSuOoBBSdl00pE' | ||
| REACT_APP_SERVER_URL='http://localhost:5000' | ||
| REACT_APP_SERVER_URL='http://localhost:3000' |
There was a problem hiding this comment.
you cant use port 3000 both for server url & base url, please return the port 5000
| <RouterProvider router={router} /> | ||
| <SnackbarProvider maxSnack={3}> | ||
| <Provider store={store}> | ||
| <RouterProvider router={router} /> |
| import axios from 'axios'; | ||
|
|
||
| const url = process.env.REACT_APP_SERVER_URL; | ||
| const url = process.env.REACT_APP_BASE_URL; |
| const [sendNotificationTime, setSendNotificationTime] = useState(notificationTime); | ||
| const [displayIncomeMessages, setDisplayIncomeMessages] = useState(showIncomeMessages); | ||
| const [displayBrowsingTimeLimit, setDisplayBrowsingTimeLimit] = useState(showBrowsingTimeLimit); | ||
| const { t } = useTranslation(); |
| displayBrowsingTimeLimit:showBrowsingTimeLimit, emailFrequency: initialEmailFrequency, } = currentUser.preference; | ||
| const [emailFrequency, setEmailFrequency] = useState(initialEmailFrequency); | ||
| const [ringtoneFile, setRingtoneFile] = useState(null); | ||
| const url = process.env.REACT_APP_BASE_URL; |
There was a problem hiding this comment.
why do you have to save it in variable?
| @@ -62,8 +64,10 @@ export const deletePreference = async (req, res, next) => { | |||
| if (!PreferenceForDelet) | |||
| return next({ message: 'Preferencs not found !!' }) | |||
| export const getAllProfiles = async (req, res) => { | ||
| try { | ||
| const profiles = await Profiles.find().populate('limitedWebsites.websiteId blockedSites').select('-__v'); | ||
| const profiles = await Profiles.find().populate('limitedWebsites.websiteId').select('-__v'); |
There was a problem hiding this comment.
Is this change related to your task?
| if(!mongoose.Types.ObjectId.isValid(id)) | ||
| return next({message:'id is not valid'}) | ||
| if (!mongoose.Types.ObjectId.isValid(id)) | ||
| return next({ message: 'id is not valid' }); |
There was a problem hiding this comment.
add status codes to all next usages
| req.body.profileImage = req.file.originalname; | ||
|
|
||
|
|
||
| // שינוי פורמט התאריך, נניח אם יש שדה בשם date |
There was a problem hiding this comment.
replace to English comment, or remove
|
|
||
| // שינוי פורמט התאריך, נניח אם יש שדה בשם date | ||
| if (req.body.date) { | ||
| req.body.date = moment(req.body.date).format('yyyy-MM-dd'); // החלף בפורמט הרצוי |
There was a problem hiding this comment.
replace with English comment, or remove
No description provided.