API Subsonic: Adding playlist support

This commit is contained in:
emeric
2019-04-12 14:00:05 +02:00
parent 366420013f
commit fdbac7f444
10 changed files with 555 additions and 228 deletions
+12 -1
View File
@@ -180,10 +180,21 @@ Handler::getUser(const Wt::Auth::User& authUser)
return authInfo->user();
}
User::pointer
Handler::getUser(const std::string& loginName)
{
auto authUser {getUserDatabase().findWithIdentity(Wt::Auth::Identity::LoginName, loginName)};
if (!authUser.isValid())
return User::pointer {};
return getUser(authUser);
}
User::pointer
Handler::createUser(const Wt::Auth::User& authUser)
{
if (!authUser.isValid()) {
if (!authUser.isValid())
{
LMS_LOG(DB, ERROR) << "Handler::getUser: invalid authUser";
return User::pointer();
}