feat(apiv2): GET endpoints except guilds

- ResolveT methods in ControllerBase
- ContextFor methods in ControllerBase
This commit is contained in:
spiral
2021-10-12 05:17:54 -04:00
parent 11620d94c8
commit e2a56a198f
9 changed files with 249 additions and 60 deletions

View File

@@ -41,11 +41,17 @@ namespace PluralKit.API
public static class APIErrors
{
public static PKError GenericBadRequest = new(400, 0, "400: Bad Request");
public static PKError GenericAuthError = new(401, 0, "401: Missing or invalid Authorization header");
public static PKError SystemNotFound = new(404, 20001, "System not found.");
public static PKError MemberNotFound = new(404, 20002, "Member not found.");
public static PKError GroupNotFound = new(404, 20003, "Group not found.");
public static PKError MessageNotFound = new(404, 20004, "Message not found.");
public static PKError SwitchNotFound = new(404, 20005, "Switch not found.");
public static PKError UnauthorizedMemberList = new(403, 30001, "Unauthorized to view member list");
public static PKError UnauthorizedGroupList = new(403, 30002, "Unauthorized to view group list");
public static PKError UnauthorizedGroupMemberList = new(403, 30003, "Unauthorized to view group member list");
public static PKError UnauthorizedCurrentFronters = new(403, 30004, "Unauthorized to view current fronters.");
public static PKError UnauthorizedFrontHistory = new(403, 30004, "Unauthorized to view front history.");
public static PKError Unimplemented = new(501, 50001, "Unimplemented");
}
}