Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
E
ESDP_froot.kz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ESDP_froot.kz
ESDP_froot.kz
Commits
4255ad8e
Commit
4255ad8e
authored
Jun 02, 2021
by
Pavel Mishakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#45
исправил сохрание юзера
parent
9071e51a
Pipeline
#367
failed with stages
in 42 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
calendarEvents.js
api/app/calendarEvents.js
+2
-2
payments.js
api/app/payments.js
+1
-1
No files found.
api/app/calendarEvents.js
View file @
4255ad8e
...
@@ -31,7 +31,7 @@ router.post('/', auth, upload.single('file'), async (req, res) => {
...
@@ -31,7 +31,7 @@ router.post('/', auth, upload.single('file'), async (req, res) => {
event
.
file
=
req
.
file
.
filename
;
event
.
file
=
req
.
file
.
filename
;
};
};
event
.
user
=
req
.
user
event
.
user
=
req
.
user
.
_id
await
event
.
save
()
await
event
.
save
()
try
{
try
{
...
@@ -97,7 +97,7 @@ router.delete('/:id', auth, async (req, res) => {
...
@@ -97,7 +97,7 @@ router.delete('/:id', auth, async (req, res) => {
const
event
=
await
CalendarEvent
.
findById
(
req
.
params
.
id
)
const
event
=
await
CalendarEvent
.
findById
(
req
.
params
.
id
)
try
{
try
{
if
(
process
.
env
.
NODE_ENV
!==
'test'
)
{
if
(
process
.
env
.
NODE_ENV
!==
'test'
)
{
axios
.
post
(
config
.
baseUrlForTelegram
+
':8001/telegram/delete/calendarEvents'
,
event
);
a
wait
a
xios
.
post
(
config
.
baseUrlForTelegram
+
':8001/telegram/delete/calendarEvents'
,
event
);
}
}
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
log
(
err
)
console
.
log
(
err
)
...
...
api/app/payments.js
View file @
4255ad8e
...
@@ -59,7 +59,7 @@ const createRouter = () => {
...
@@ -59,7 +59,7 @@ const createRouter = () => {
const
momentObj
=
moment
(
payment
.
dateOfPayment
,
'YYYY-MM-DD'
)
const
momentObj
=
moment
(
payment
.
dateOfPayment
,
'YYYY-MM-DD'
)
payment
.
dateOfNotification
=
momentObj
.
subtract
(
payment
.
noticePeriod
,
'days'
).
format
(
'YYYY-MM-DD'
)
payment
.
dateOfNotification
=
momentObj
.
subtract
(
payment
.
noticePeriod
,
'days'
).
format
(
'YYYY-MM-DD'
)
payment
.
user
=
req
.
user
payment
.
user
=
req
.
user
.
_id
if
(
payment
.
repeatability
)
payment
.
repeatabilityId
=
payment
.
_id
;
if
(
payment
.
repeatability
)
payment
.
repeatabilityId
=
payment
.
_id
;
await
payment
.
save
();
await
payment
.
save
();
try
{
try
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment