Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Jetsam Server
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jetsam
Jetsam Server
Commits
a750a53f
Commit
a750a53f
authored
5 years ago
by
Louis
Browse files
Options
Downloads
Patches
Plain Diff
Don't send empty feedback
parent
872f277c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/config/sequelize.js
+1
-0
1 addition, 0 deletions
src/config/sequelize.js
src/http/controllers/api/feedback.js
+7
-0
7 additions, 0 deletions
src/http/controllers/api/feedback.js
with
8 additions
and
0 deletions
src/config/sequelize.js
+
1
−
0
View file @
a750a53f
...
...
@@ -13,6 +13,7 @@ const common = {
paranoid
:
true
,
underscored
:
true
,
},
logging
:
false
,
...(
config
(
'
database
'
,
{})),
}
...
...
This diff is collapsed.
Click to expand it.
src/http/controllers/api/feedback.js
+
7
−
0
View file @
a750a53f
...
...
@@ -49,6 +49,13 @@ function createSlackPayload({ name, email, message = '' }) {
exports
.
send
=
async
ctx
=>
{
const
{
message
}
=
ctx
.
request
.
body
if
(
!
message
)
{
ctx
.
status
=
204
ctx
.
body
=
null
return
}
const
payload
=
{
message
}
const
user
=
await
ctx
.
services
.
authService
.
getUser
()
if
(
user
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment