Function backend::routes::user::user_relation [−][src]
pub async fn user_relation(
auth: Auth,
producer: Connection<PulsarMq>,
relation_info: Json<RelationData>
) -> (Status, Result<String, Json<ErrorResponse>>)Expand description
User Relation
User likes/dislikes a post, adds a post to user collection, removes a post from user collection, follows/unfollows a burrow.
Parameters
Auth: Authenticated userConnection<PulsarMq>: Pulsar connectionJson<RelationData>: Json of relation between user and certain post/burrow
Returns
Status: HTTP statusString: String “Success”
Errors
ErrorResponse: Error messageErrorCode::DatabaseErr