git 테스트

sbkwgh 5ca8747559 Escape < 8 gadi atpakaļ
config cacfe862c4 Add sessionSecret variable 8 gadi atpakaļ
lib df0a8eea88 Try to fix socket.io bug - still doesn't work but code in place for what *should* work (i.e. reloading the session in socket.io when users sends login message 8 gadi atpakaļ
migrations c8eb10feb1 Add migration for unique username attribute 8 gadi atpakaļ
models c7e94d59ca Associate poll quesiton with thread and add test case constraints 8 gadi atpakaļ
routes 07a56dbce8 Add hasVoted parameter 8 gadi atpakaļ
test 07a56dbce8 Add hasVoted parameter 8 gadi atpakaļ
.gitignore df0a8eea88 Try to fix socket.io bug - still doesn't work but code in place for what *should* work (i.e. reloading the session in socket.io when users sends login message 8 gadi atpakaļ
LICENSE 2e15a2ca14 Create LICENSE 8 gadi atpakaļ
README.md 5ca8747559 Escape < 8 gadi atpakaļ
package.json df0a8eea88 Try to fix socket.io bug - still doesn't work but code in place for what *should* work (i.e. reloading the session in socket.io when users sends login message 8 gadi atpakaļ
server.js 62ad392607 Add poll POST route and tests 8 gadi atpakaļ

README.md

forum-backend

This is the backend (or 'api component') of the forum software to go along with the corresponding frontend project.

API Documentation

All API routes are prefixed /api/v1/

/admin_token

/

  • Method: POST
  • Response: { id: <integer>, token: <string> }
  • Notes: requires admin privileges

/ban

/

  • Method: GET
  • Data params:
    • message <string>
    • username: <string>
    • canCreateThreads <boolean>
    • canCreatePosts <boolean>
    • ipBanned <boolean>
  • Response: { id: <integer>, message: <string>, canCreateThreads: <boolean>, canCreatePosts: <boolean>, ipBanned: <boolean>, User: { id: <integer>, username: <string>, description: <null | string>, color: <string>, createdAt: <string> }
    • Notes: requires admin privileges