Skip to content

Latest commit

 

History

History
92 lines (76 loc) · 1.73 KB

File metadata and controls

92 lines (76 loc) · 1.73 KB

Comment Struct

Comment{
    "id": string,
    "userId": string,
    "postId": string,
    "content":string,
    "date":string,
}

GetByUser

  • path: /comment/user/{id}/{pagenumber}/{pagesize}

  • returns:

    {
        "comments": Comment[],
        "success": Number,
        "message" : String
    }

GetByPost

  • path : /comment/post/{id}/{pagenumber}/{pagesize}
  • method: DELETE
  • returns:
    {
        "comments": Comment[],
        "success": Number,
        "message" : String
    }

Add

  • path: /comment/new

  • method: POST

  • params:

    • Header:

      Name Description Type
      x-auth-token authentication token of the user String
  • returns:

    {
        "comments": Comment[],
        "success": Number,
        "message" : String
    }

Delete

  • path: /comment/{id}
  • method: DELETE
  • params:
    • Header:

      Name Description Type
      x-auth-token authentication token of the user String
  • returns:
    {
        "comments": Comment[],
        "success": Number,
        "message" : String
    }

Vote

  • path: /comment/vote

  • method: POST

  • params:

    • Header:

      Name Description Type
      x-auth-token authentication token of the user String
  • returns:

    {
        "comments": Comment[],
        "success": Number,
        "message" : String
    }