Skip to content

Latest commit

 

History

History
76 lines (52 loc) · 943 Bytes

File metadata and controls

76 lines (52 loc) · 943 Bytes

Delete review

Method : DELETE

URL : /games/:game_id/reviews/:review_id

Auth required : True

Data constraints

Headers {
    x-access-token : Token from '/auth/login'
}

Success Response

Code : 204 No Content

Content example

NULL

Error Response

Condition : Can not find review matching game_id and review_id

Code : 404 Not Found

Content

{
    message: "Review not found" 
}

Condition : 'x-access-token' is not included in the header

Code : 400 Bad Request

Content

{
    message: "Token is required"
}

Condition : 'x-access-token' is included, but can not be decoded

Code : 400 Bad Request

Content

{
    message: "Token is invalid"
}

Condition : Can not find user matching token. It may be an old token.

Code : 404 Not Found

Content

{
    message: 'User not found'
}