add: ability to add user to stack through block list ui
This commit is contained in:
parent
8c969cd56f
commit
2a77c61bf2
10 changed files with 130 additions and 20 deletions
|
@ -211,6 +211,10 @@ pub async fn add_user_request(
|
|||
Err(e) => return Json(e.into()),
|
||||
};
|
||||
|
||||
if stack.users.contains(&other_user.id) {
|
||||
return Json(Error::MiscError("This user is already in this stack".to_string()).into());
|
||||
}
|
||||
|
||||
stack.users.push(other_user.id);
|
||||
|
||||
// check number of stacks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue