Skip to content
Snippets Groups Projects
Commit a750a53f authored by Louis's avatar Louis :fire:
Browse files

Don't send empty feedback

parent 872f277c
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,7 @@ const common = { ...@@ -13,6 +13,7 @@ const common = {
paranoid: true, paranoid: true,
underscored: true, underscored: true,
}, },
logging: false,
...(config('database', {})), ...(config('database', {})),
} }
......
...@@ -49,6 +49,13 @@ function createSlackPayload({ name, email, message = '' }) { ...@@ -49,6 +49,13 @@ function createSlackPayload({ name, email, message = '' }) {
exports.send = async ctx => { exports.send = async ctx => {
const { message } = ctx.request.body const { message } = ctx.request.body
if (!message) {
ctx.status = 204
ctx.body = null
return
}
const payload = { message } const payload = { message }
const user = await ctx.services.authService.getUser() const user = await ctx.services.authService.getUser()
if (user) { if (user) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment