missed some files

pull/226/head
TidusJar 9 years ago
parent 8a14427cea
commit db6f28f980

@ -276,11 +276,6 @@ namespace PlexRequests.UI.Modules
private Response ApproveAllTVShows()
{
if (!Context.CurrentUser.IsAuthenticated())
{
return Response.AsJson(new JsonResponseModel { Result = false, Message = "You are not an Admin, so you cannot approve any requests." });
}
var requests = Service.GetAll().Where(x => x.CanApprove && x.Type == RequestType.TvShow);
var requestedModels = requests as RequestedModel[] ?? requests.ToArray();
if (!requestedModels.Any())

@ -25,12 +25,12 @@ namespace PlexRequests.UI
Get ["/users"] = x => LoadUsers ();
}
public Negotiator Load()
private Negotiator Load()
{
return View ["Index"];
}
public Response LoadUsers()
private Response LoadUsers()
{
var users = UserMapper.GetUsers ();
var model = new List<UserManagementUsersViewModel>();
@ -45,6 +45,21 @@ namespace PlexRequests.UI
}
return Response.AsJson (users);
}
}
private Response CreateUser(string username, string password, string claims)
{
if (string.IsNullOrWhiteSpace (username) || string.IsNullOrWhiteSpace (password)) {
return Response.AsJson (new JsonResponseModel {
Result = true,
Message = "Please enter in a valid Username and Password"
});
}
var user = UserMapper.CreateUser (username, password, new string[]{ claims });
if(user.HasValue){
return Response.AsJson(new JsonResponseModel{ Result = true});
}
return Response.AsJson(new JsonResponseModel{ Result = false, Message = "Could not save user"});
}
}

Loading…
Cancel
Save