First cut of answered requests
- changed import to only bring in church rather than the entire lodash package - changed webpack config to exclude moment's locale - set the bearer token on load if the user is authenticated
This commit is contained in:
@@ -77,7 +77,8 @@ export default function (pool) {
|
||||
(await pool.query(`${currentRequestSql}
|
||||
WHERE "userId" = $1
|
||||
AND "lastStatus" = 'Answered'
|
||||
ORDER BY "asOf" DESC`)).rows,
|
||||
ORDER BY "asOf" DESC`,
|
||||
[ userId ])).rows,
|
||||
|
||||
/**
|
||||
* Get the "current" version of a request by its Id
|
||||
|
||||
@@ -47,6 +47,7 @@ export default function (checkJwt) {
|
||||
})
|
||||
.get('/answered', checkJwt, async (ctx, next) => {
|
||||
ctx.body = await db.request.answered(ctx.state.user.sub)
|
||||
ctx.response.status = 200
|
||||
await next()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user