Fix for standard

parent 829fe24c
Pipeline #52218077 passed with stage
in 1 minute and 10 seconds
......@@ -47,20 +47,19 @@ function patch (callback) {
const insUrlSql = `INSERT INTO url(code, url) VALUES($1, $2) RETURNING *`
async function createUrl(url) {
async function createUrl (url) {
try {
const params = [ zid(6), url ]
const result = await pool.query(insUrlSql, params)
return {
ok: true,
payload: result.rows[0],
payload: result.rows[0]
}
}
catch(err) {
} catch (err) {
console.error(err)
return {
ok: false,
msg: "Internal Server Error",
msg: 'Internal Server Error'
}
}
}
......
......@@ -84,7 +84,7 @@ app.get(
stats.home.inc()
res.render('index', {
menu: 'home',
form: {},
form: {}
})
}
)
......@@ -100,8 +100,8 @@ app.post(
menu: 'home',
err: result.msg,
form: {
url: req.body.url,
},
url: req.body.url
}
})
return
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment