mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Finished the notes! Resolved #7
This commit is contained in:
parent
98c0a4f879
commit
a2f44cf8d2
10 changed files with 40 additions and 28 deletions
|
@ -118,7 +118,7 @@ namespace PlexRequests.UI.Modules
|
|||
var settings = AuthSettings.GetSettings();
|
||||
if (settings?.PlexAuthToken == null)
|
||||
{
|
||||
return Response.AsJson(new JsonResponseModel { Result = false, Message = "Plex is not setup yet, we need " });
|
||||
return Response.AsJson(new JsonResponseModel { Result = false, Message = "Plex is not setup yet, you need to update your Authentication settings" });
|
||||
}
|
||||
try
|
||||
{
|
||||
|
|
|
@ -86,12 +86,14 @@ namespace PlexRequests.UI.Modules
|
|||
|
||||
Post["/register"] = x =>
|
||||
{
|
||||
var username = (string) Request.Form.Username;
|
||||
var exists = UserMapper.DoUsersExist();
|
||||
if (exists)
|
||||
{
|
||||
return Context.GetRedirect("~/register?error=true&username=" + (string)Request.Form.Username);
|
||||
return Context.GetRedirect("~/register?error=true&username=" + username);
|
||||
}
|
||||
var userId = UserMapper.CreateUser(Request.Form.Username, Request.Form.Password);
|
||||
var userId = UserMapper.CreateUser(username, Request.Form.Password);
|
||||
Session[SessionKeys.UsernameKey] = username;
|
||||
return this.LoginAndRedirect((Guid)userId);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace PlexRequests.UI.Modules
|
|||
Post["/clearissues"] = _ => ClearIssue((int)Request.Form.Id);
|
||||
|
||||
Post["/changeavailability"] = _ => ChangeRequestAvailability((int)Request.Form.Id, (bool)Request.Form.Available);
|
||||
Post["/addnote"] = _ => AddNote((int)Request.Form.Id, (string)Request.Form.noteArea);
|
||||
Post["/addnote"] = _ => AddNote((int)Request.Form.requestId, (string)Request.Form.noteArea);
|
||||
}
|
||||
|
||||
private IRepository<RequestedModel> Service { get; }
|
||||
|
@ -213,7 +213,7 @@ namespace PlexRequests.UI.Modules
|
|||
var originalRequest = Service.Get(requestId);
|
||||
if (originalRequest == null)
|
||||
{
|
||||
return Response.AsJson(new JsonResponseModel { Result = false, Message = "Request does not exist to change the availability!" });
|
||||
return Response.AsJson(new JsonResponseModel { Result = false, Message = "Request does not exist to add a note!" });
|
||||
}
|
||||
|
||||
originalRequest.AdminNote = noteArea;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue