Skip to content

alteca/suggest-us

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Suggest-us

API used to vote for a subject to present in future presentation

Installation

$ npm install

Run in dev

$ npm start

Run in prod

$ npm run start:prod

API

For all endpoints add the header

Content-Type: application/json

Auth

user structure

{"username": "admin", "password": "admin"}

Action Verb Url Params Success Error
login POST /api/auth/login {"username":"admin", "password":"admin"} {"user":{}, "token":""} {"error":"error desc"}
join POST /api/auth/join {"username":"newuser", "password":"newuser"} {"user":{}, "token":""} {"error":"error desc"}

Subjects

structure

{ "id" => integer, "name" => string }

Action Verb Url Params Success Error
get all GET /api/subjects {} [{}, {}, ...] {"error":"error desc"}

Votes

structure

{ "userId" => integer, "subjectId" => integer, "date" => date }

Action Verb Url Params Success Error
get all GET /api/votes {} [{}, {}, ...] {"error":"error desc"}
synthesize GET /api/synthesize {} [{"voteCount":x,"Subject":{}}, ...] {"error":"error desc"}

About

List of subjects to present in future

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published