gradido/login_server/src/cpp/JSONInterface/JsonUpdateUserInfos.h
einhornimmond f88ddbbf1c update string validation
- move it in extra function to have less code copies
- fix bug which return no error messag if input was an array instead of a string
2021-06-10 09:58:08 +02:00

26 lines
637 B
C++

#ifndef __JSON_INTERFACE_JSON_UPDATE_USER_INFOS_
#define __JSON_INTERFACE_JSON_UPDATE_USER_INFOS_
#include "JsonRequestHandler.h"
/*!
* @author Dario Rekowski
* @date 2020-07-30
* @brief to update non critical user data like first-name and last-name from community server with valid login-server session id
*
* works only for admins
*/
class JsonUpdateUserInfos : public JsonRequestHandler
{
public:
Poco::JSON::Object* handle(Poco::Dynamic::Var params);
protected:
std::string validateString(Poco::Dynamic::Var value, const char* fieldName, Poco::JSON::Array& errorArray);
};
#endif // __JSON_INTERFACE_JSON_UPDATE_USER_INFOS_