-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #596 from OneCommunityGlobal/luis-fix-user-profile…
…-projects-delay Luis fix user profile projects delay
- Loading branch information
Showing
12 changed files
with
788 additions
and
635 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ const dashboardcontroller = function () { | |
return User.findOneAndUpdate( | ||
{ _id: req.params.userId }, | ||
{ copiedAiPrompt: Date.now() }, | ||
{ new: true }, | ||
{ new: true } | ||
) | ||
.then((user) => { | ||
if (user) { | ||
|
@@ -51,7 +51,7 @@ const dashboardcontroller = function () { | |
...req.body, | ||
aIPromptText: req.body.aIPromptText, | ||
modifiedDatetime: Date.now(), | ||
}, | ||
} | ||
) | ||
.then(() => { | ||
res.status(200).send("Successfully saved AI prompt."); | ||
|
@@ -90,7 +90,7 @@ const dashboardcontroller = function () { | |
const laborthismonth = dashboardhelper.laborthismonth( | ||
userId, | ||
req.params.fromDate, | ||
req.params.toDate, | ||
req.params.toDate | ||
); | ||
laborthismonth.then((results) => { | ||
if (!results || results.length === 0) { | ||
|
@@ -112,7 +112,7 @@ const dashboardcontroller = function () { | |
const laborthisweek = dashboardhelper.laborthisweek( | ||
userId, | ||
req.params.fromDate, | ||
req.params.toDate, | ||
req.params.toDate | ||
); | ||
laborthisweek.then((results) => { | ||
res.status(200).send(results); | ||
|
@@ -155,7 +155,7 @@ const dashboardcontroller = function () { | |
expected, | ||
actual, | ||
visual, | ||
severity, | ||
severity | ||
) { | ||
const text = `New Bug Report From <b>${firstName} ${lastName}</b>: | ||
<p>[Feature Name] Bug Title:</p> | ||
|
@@ -200,15 +200,15 @@ const dashboardcontroller = function () { | |
expected, | ||
actual, | ||
visual, | ||
severity, | ||
severity | ||
); | ||
|
||
try { | ||
emailSender( | ||
"[email protected]", | ||
`Bug Rport from ${firstName} ${lastName}`, | ||
emailBody, | ||
email, | ||
); | ||
res.status(200).send("Success"); | ||
} catch { | ||
|
@@ -263,15 +263,13 @@ const dashboardcontroller = function () { | |
|
||
// send suggestion email | ||
const sendMakeSuggestion = async (req, res) => { | ||
const { | ||
suggestioncate, suggestion, confirm, email, ...rest | ||
} = req.body; | ||
const { suggestioncate, suggestion, confirm, email, ...rest } = req.body; | ||
const emailBody = await getsuggestionEmailBody( | ||
suggestioncate, | ||
suggestion, | ||
confirm, | ||
rest, | ||
email, | ||
); | ||
try { | ||
emailSender( | ||
|
@@ -281,7 +279,7 @@ const dashboardcontroller = function () { | |
null, | ||
null, | ||
email, | ||
null, | ||
null | ||
); | ||
res.status(200).send("Success"); | ||
} catch { | ||
|
@@ -310,7 +308,7 @@ const dashboardcontroller = function () { | |
} | ||
if (req.body.action === "delete") { | ||
suggestionData.suggestion = suggestionData.suggestion.filter( | ||
(item, index) => index + 1 !== +req.body.newField, | ||
(item, index) => index + 1 !== +req.body.newField | ||
); | ||
} | ||
} else { | ||
|
Oops, something went wrong.