New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add api endpoints #281
add api endpoints #281
Conversation
9e260bf
to
12f3410
Compare
Codecov Report
@@ Coverage Diff @@
## master #281 +/- ##
=========================================
- Coverage 21.06% 20.17% -0.9%
=========================================
Files 28 31 +3
Lines 674 704 +30
=========================================
Hits 142 142
- Misses 532 562 +30
Continue to review full report at Codecov.
|
app/api.js
Outdated
@@ -34,11 +35,55 @@ app.get('/users/create/:username', (req, res) => { | |||
} | |||
}) | |||
|
|||
app.post('/promises/parse/', (req, res) => { | |||
const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identical blocks of code found in 2 locations. Consider refactoring.
app/api.js
Outdated
// TODO implement a /create POST endpoint | ||
// app.post('/promises/create/', (req, resp) => {}) | ||
app.post('/_s/:user/promises/create/', (req, res) => { | ||
const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identical blocks of code found in 2 locations. Consider refactoring.
app/api.js
Outdated
import actionNotifier from '../lib/notify' | ||
import parseCredit from '../lib/parse/credit' | ||
import { seed, importJson } from '../db/seed' | ||
import cache from '../db/cache' | ||
|
||
// TODO: https://github.com/Vincit/objection.js/tree/master/examples/express-ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO found
Code Climate has analyzed commit 1abf1f7 and detected 8 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 0.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 20.1% (-0.8% change). View more on Code Climate. |
const api = Router() | ||
|
||
api.post('/promises/parse/', (req, res) => { | ||
const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identical blocks of code found in 2 locations. Consider refactoring.
}) | ||
|
||
api.post('/promises/create/', (req, res) => { | ||
const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identical blocks of code found in 2 locations. Consider refactoring.
import PromiseApi from '../api/v1/promises' | ||
import UserApi from '../api/v1/users' | ||
|
||
// TODO: https://github.com/Vincit/objection.js/tree/master/examples/express-ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO found
http://api.commits.to/docs