git 테스트

sbkwgh 1dd8a10990 Start adding documentation пре 8 година
config cacfe862c4 Add sessionSecret variable пре 8 година
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 година
migrations c8eb10feb1 Add migration for unique username attribute пре 8 година
models c7e94d59ca Associate poll quesiton with thread and add test case constraints пре 8 година
routes 07a56dbce8 Add hasVoted parameter пре 8 година
test 07a56dbce8 Add hasVoted parameter пре 8 година
.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 година
LICENSE 2e15a2ca14 Create LICENSE пре 8 година
README.md 1dd8a10990 Start adding documentation пре 8 година
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 година
server.js 62ad392607 Add poll POST route and tests пре 8 година

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
    • username:
    • canCreateThreads
    • canCreatePosts
    • ipBanned
    • 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