check comment owner by username
This commit is contained in:
@@ -118,6 +118,7 @@ export const validateCredentials = (username, password) => {
|
||||
|
||||
// if(decodedAceessToken.data.wiaas_user_type === 'customer'){
|
||||
localStorage.setItem('accessToken', response.data.token);
|
||||
localStorage.setItem('username', username);
|
||||
const serverTime = decodedAceessToken.nbf || 1;
|
||||
// refreshToken = response.data.refreshToken;
|
||||
startRefreshTimer(dispatch, serverTime);
|
||||
|
||||
@@ -69,8 +69,7 @@ export const addComment = (idOrder, newComment, existingComments) => {
|
||||
const newCommentObject = {
|
||||
comment : newComment,
|
||||
date : moment().format("Do MMM, YY"),
|
||||
username: 'username',
|
||||
isOwner: 1,
|
||||
username: localStorage.getItem('username') || '-',
|
||||
}
|
||||
const concatenatedComments = (existingComments) ? existingComments.concat(newCommentObject) : [newCommentObject];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user