Subsonic API: added user management commands

This commit is contained in:
emeric
2019-08-02 14:56:08 +02:00
parent 8409184511
commit 61032e5292
6 changed files with 462 additions and 257 deletions
File diff suppressed because it is too large Load Diff
+11 -5
View File
@@ -77,14 +77,20 @@ CustomTypeToString(Error::CustomType type)
{
switch (type)
{
case Error::CustomType::BadId:
return "Bad id";
case Error::CustomType::NotImplemented:
return "Not implemented";
case Error::CustomType::InternalError:
case Error::CustomType::BadIdFormat:
return "Bad id format";
case Error::CustomType::BadPasswordFormat:
return "Internal error";
case Error::CustomType::InternalError:
return "Bad password format";
case Error::CustomType::LoginThrottled:
return "Login throttled, too many attempts";
case Error::CustomType::NotImplemented:
return "Not implemented";
case Error::CustomType::PasswordTooWeak:
return "Password too weak";
case Error::CustomType::UserAlreadyExists:
return "User already exists";
}
return "Unknown custom error";
+6 -3
View File
@@ -48,10 +48,13 @@ class Error
enum class CustomType
{
BadId,
NotImplemented,
LoginThrottled,
BadIdFormat,
BadPasswordFormat,
InternalError,
LoginThrottled,
NotImplemented,
PasswordTooWeak,
UserAlreadyExists,
};
Error(Code code);