Giter Site home page Giter Site logo

hacktivoverflow's Introduction

hacktivoverflow

Cara main

  • buat file .env dari template .envTemplate
  • jalankan dev server, masuk ke folder server npm run dev

API Route

::API POST harus menggunakan Content-Type header dengan nilai application/json::

user

Route HTTP Header BodyJSON / QueryParam Response Description Validation
/user/register POST - {email, fullName, password} {_id, email, fullName, password} register a user email must be valid, name is more than 1 char
/user/login POST - {email, password} {access_token} login: get token -

question

Route HTTP Header BodyJSON / QueryParam Response Description Validation
/question GET token { user, title, description, upvotes, downvotes, updatedAt, botAnswerTitle, botAnswerLink } get questions -
/question/:id GET { user, title, description, upvotes, downvotes, updatedAt, botAnswerTitle, botAnswerLink, [answers] } get questions detial with answers -
/question POST token {title, description} { user, title, description, upvotes, downvotes, updatedAt, botAnswerTitle, botAnswerLink, [answers] } post question -
/question PATCH token {title, description} { user, title, description, upvotes, downvotes, updatedAt, botAnswerTitle, botAnswerLink, [answers] } update question -
/question/action action = upvote / downvote PATCH token {} { user, title, description, upvotes, downvotes, updatedAt, botAnswerTitle, botAnswerLink, [answers] } update question -
/question/:id DELETE token {} { } delete question -

answer

Route HTTP Header BodyJSON / QueryParam Response Description Validation
/answer GET token { user, title, description, upvotes, downvotes, updatedAt, botAnswerTitle, botAnswerLink } get answers -
/answer/:id GET { user, title, description, upvotes, downvotes, updatedAt, botAnswerTitle, botAnswerLink, [answers] } get answers detial with answers -
/answer POST token {title, description} { user, title, description, upvotes, downvotes, updatedAt, botAnswerTitle, botAnswerLink, [answers] } post answer -
/answer PATCH token {title, description} { user, title, description, upvotes, downvotes, updatedAt, botAnswerTitle, botAnswerLink, [answers] } update answer -
/answer/action action = upvote / downvote PATCH token {} { user, title, description, upvotes, downvotes, updatedAt, botAnswerTitle, botAnswerLink, [answers] } update answer -
/answer/:id DELETE token {} { } delete answer -

hacktivoverflow's People

Contributors

dmtrxw avatar khasburrahman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.