git 테스트

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

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