Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
les
gancio
Commits
ff0bb195
Verified
Commit
ff0bb195
authored
Jul 27, 2021
by
les
Browse files
use new ics to fix uuid warning
parent
91c4e6a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/api/controller/export.js
View file @
ff0bb195
...
...
@@ -62,8 +62,8 @@ const exportController = {
const
eventsMap
=
events
.
map
(
e
=>
{
const
tmpStart
=
moment
.
unix
(
e
.
start_datetime
)
const
tmpEnd
=
moment
.
unix
(
e
.
end_datetime
)
const
start
=
tmpStart
.
utc
(
true
).
format
(
'
YYYY-M-D-H-m
'
).
split
(
'
-
'
)
const
end
=
tmpEnd
.
utc
(
true
).
format
(
'
YYYY-M-D-H-m
'
).
split
(
'
-
'
)
const
start
=
tmpStart
.
utc
(
true
).
format
(
'
YYYY-M-D-H-m
'
).
split
(
'
-
'
)
.
map
(
Number
)
const
end
=
tmpEnd
.
utc
(
true
).
format
(
'
YYYY-M-D-H-m
'
).
split
(
'
-
'
)
.
map
(
Number
)
return
{
start
,
// startOutputType: 'utc',
...
...
@@ -77,8 +77,12 @@ const exportController = {
}
})
res
.
type
(
'
text/calendar; charset=UTF-8
'
)
const
ret
=
ics
.
createEvents
(
eventsMap
)
res
.
send
(
ret
.
value
)
ics
.
createEvents
(
eventsMap
,
(
err
,
value
)
=>
{
if
(
err
)
{
return
res
.
status
(
401
).
send
(
err
)
}
return
res
.
send
(
value
)
})
}
}
...
...
Write
Preview
Supports
Markdown
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