Пример #1
0
        public static ServerResponse addUserWidget(long userId, WidgetModel widget)
        {
            UserModel user = SqliteHandler.getUser(userId);

            if (user == null)
            {
                return(new ServerResponse(false, "user could not be found", null));
            }

            long wid = SqliteHandler.createWidget(userId, widget);

            return(new ServerResponse(true, "widget was successfully created", wid));
        }