Skip to content
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

Merged
merged 4 commits into from Oct 4, 2018
Merged

add api endpoints #281

merged 4 commits into from Oct 4, 2018

Conversation

chrisbutler
Copy link
Member

@chrisbutler chrisbutler commented Sep 23, 2018

@codecov
Copy link

codecov bot commented Sep 23, 2018

Codecov Report

Merging #281 into master will decrease coverage by 0.89%.
The diff coverage is 0%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
server/db/sequelize.js 0% <ø> (ø)
helpers/calculate.js 0% <ø> (ø) ⬆️
helpers/utils.js 0% <ø> (ø) ⬆️
server/app/middleware.js 0% <ø> (ø)
server/db/cache.js 0% <ø> (ø)
helpers/path.js 0% <ø> (ø) ⬆️
server/app/express.js 0% <ø> (ø)
lib/mail.js 30% <ø> (ø) ⬆️
server/db/seed.js 0% <ø> (ø)
server/models/user.js 0% <ø> (ø)
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1f01aa...1abf1f7. Read the comment docs.

app/api.js Outdated
@@ -34,11 +35,55 @@ app.get('/users/create/:username', (req, res) => {
}
})

app.post('/promises/parse/', (req, res) => {
const {
Copy link

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 {
Copy link

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO found

@codeclimate
Copy link

codeclimate bot commented Sep 23, 2018

Code Climate has analyzed commit 1abf1f7 and detected 8 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 4
Complexity 1
Bug Risk 3

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.

@chrisbutler chrisbutler temporarily deployed to commits-to-staging September 24, 2018 19:05 Inactive
const api = Router()

api.post('/promises/parse/', (req, res) => {
const {
Copy link

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 {
Copy link

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO found

@chrisbutler chrisbutler temporarily deployed to commits-to-staging September 28, 2018 10:58 Inactive
@chrisbutler chrisbutler temporarily deployed to commits-to-staging September 28, 2018 11:03 Inactive
@chrisbutler chrisbutler merged commit 4fb3aba into master Oct 4, 2018
@chrisbutler chrisbutler deleted the api-endpoints branch October 4, 2018 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant