Promote New Club Owner

POST /clubs/{clubID}/promote/{username} : Promoting a new club owner and demoting the current one

Note: Once the current owner is demoted to a manager, they can now leave the club.
See Leave Club for more info.

Example Request

This is a protected route, a valid JWT is required in the header field

Header

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTU4MjQyNzUsImlhdCI6IjIwMjAtMDctMjdUMDA6MjY6MTUuNzg5NTg0Mi0wNDowMCIsInN1YiI6ImNocmlzIn0.5US2_ITKcfgkpEbfsR-gxXbGPFY6XsgJPcGA5qaBD1M

Possible Responses

Immediate Success

{
"code": 1,
"message": "successfully promoted new owner",
"data": {}
}

Failure

{
"code": -1,
"message": "club not found",
"data": {}
}
{
"code": -1,
"message": "user not found",
"data": {}
}
{
"code": -1,
"message": "you must be the owner of the club in order to promote a new owner",
"data": {}
}
{
"code": -1,
"message": "the user you're trying to promote must be a club manager",
"data": {}
}
{
"code": -1,
"message": "you can't promote yourself to be the club owner if you're already the owner",
"data": {}
}
Last updated on by Chris Lim