Skip to content

topcoder-platform/submission-review-api

Repository files navigation

Topcoder Submission Review APP API

Prerequisites

  • NodeJS (v8+)

Configuration

Configuration for the application is at config/default.js. The following parameters can be set in config files or in env variables:

Local Deployment

  • Install dependencies npm install
  • Run lint npm run lint
  • Run lint fix npm run lint:fix
  • Start app npm start
  • App is running at http://localhost:3000

Running tests

All external API calls are mocked in Unit tests and E2E tests. Hence tests can be run without any dependency.

Logging level for tests can be controlled at config/test.js

Running unit tests

To run unit tests alone

npm run test

To run unit tests with coverage report

npm run test:cov

Running integration tests

To run integration tests alone

npm run e2e

To run integration tests with coverage report

npm run e2e:cov

Notes

  • Currently, Submission v5 api and Review v5 api doesn't support OR data. In another word, we can't retrieve such review data of Challenges(Code, F2F and etc.) using OR to perform review. It has been approved that these issues will be left into next challenge in the forum.
  • This API accepts TC v3 JWT for authorization, tc-core-library-js node modules contains a middleware jwtAuthenticator which provide authorization business logic. Here is one of the example payload for v3 JWT using in DEV
{
  "roles": [
    "Topcoder User",
    "Connect Support",
    "administrator",
    "testRole",
    "aaa",
    "tony_test_1",
    "Connect Manager",
    "Connect Admin",
    "copilot",
    "Connect Copilot Manager"
  ],
  "iss": "https://api.topcoder-dev.com",
  "handle": "TonyJ",
  "exp": 1551792211,
  "userId": "8547899",
  "iat": 1549791611,
  "email": "tjefts+fix@topcoder.com",
  "jti": "f94d1e26-3d0e-46ca-8115-8754544a08f1"
}
  • All JWT tokens provided in Postman environment file is created in JWT.IO with secret mysecret, same as default AUTH_SECRET value in config/default.js file.

About

Submission Reviewing System API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published