corrects group active group incorrect args
This commit is contained in:
parent
2e477d5e5a
commit
e405e7930e
1 changed files with 5 additions and 5 deletions
|
|
@ -374,22 +374,22 @@ namespace BetterSecondBot.HttpService
|
||||||
[ReturnHints("Invaild group UUID")]
|
[ReturnHints("Invaild group UUID")]
|
||||||
[ArgHints("group", "URLARG", "the UUID of the group")]
|
[ArgHints("group", "URLARG", "the UUID of the group")]
|
||||||
[Route(HttpVerbs.Get, "/GroupActiveGroup/{group}/{token}")]
|
[Route(HttpVerbs.Get, "/GroupActiveGroup/{group}/{token}")]
|
||||||
public object GroupActiveGroup(string group, string role, string token)
|
public object GroupActiveGroup(string group, string token)
|
||||||
{
|
{
|
||||||
if (tokens.Allow(token, "groups", "GroupActiveGroup", handleGetClientIP()) == false)
|
if (tokens.Allow(token, "groups", "GroupActiveGroup", handleGetClientIP()) == false)
|
||||||
{
|
{
|
||||||
return Failure("Token not accepted", "GroupActiveGroup", new string[] { group, role });
|
return Failure("Token not accepted", "GroupActiveGroup", new string[] { group });
|
||||||
}
|
}
|
||||||
if (UUID.TryParse(group, out UUID groupuuid) == false)
|
if (UUID.TryParse(group, out UUID groupuuid) == false)
|
||||||
{
|
{
|
||||||
return Failure("Invaild group UUID", "GroupActiveGroup", new string[] { group, role });
|
return Failure("Invaild group UUID", "GroupActiveGroup", new string[] { group });
|
||||||
}
|
}
|
||||||
if (bot.MyGroups.ContainsKey(groupuuid) == false)
|
if (bot.MyGroups.ContainsKey(groupuuid) == false)
|
||||||
{
|
{
|
||||||
return Failure("Unknown group", "GroupActiveGroup", new string[] { group, role });
|
return Failure("Unknown group", "GroupActiveGroup", new string[] { group });
|
||||||
}
|
}
|
||||||
bot.GetClient.Groups.ActivateGroup(groupuuid);
|
bot.GetClient.Groups.ActivateGroup(groupuuid);
|
||||||
return BasicReply("Switching active group", "GroupActiveGroup", new string[] { group, role });
|
return BasicReply("Switching active group", "GroupActiveGroup", new string[] { group });
|
||||||
}
|
}
|
||||||
|
|
||||||
[About("Sends a group notice with an attachment")]
|
[About("Sends a group notice with an attachment")]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue