mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-14 17:22:54 -07:00
Fixed issues not loading
This commit is contained in:
parent
cdfe91e3a4
commit
7ca57f3666
9 changed files with 2360 additions and 16 deletions
|
@ -43,7 +43,7 @@ namespace Ombi.Hubs
|
|||
}
|
||||
|
||||
var user = await _userManager.Users.
|
||||
FirstOrDefaultAsync(x => x.Id.Equals(userIdClaim.Value, StringComparison.InvariantCultureIgnoreCase));
|
||||
FirstOrDefaultAsync(x => x.Id == userIdClaim.Value);
|
||||
var claims = await _userManager.GetRolesAsync(user);
|
||||
UsersOnline.TryAdd(Context.ConnectionId, new HubUsers
|
||||
{
|
||||
|
|
|
@ -13,13 +13,14 @@ namespace Ombi.Store.Entities.Requests
|
|||
public int? RequestId { get; set; }
|
||||
public string Subject { get; set; }
|
||||
public string Description { get; set; }
|
||||
public int SeasonNumber { get; set; }
|
||||
public int EpisodeNumber { get; set; }
|
||||
//public int SeasonNumber { get; set; }
|
||||
//public int EpisodeNumber { get; set; }
|
||||
public int IssueCategoryId { get; set; }
|
||||
[ForeignKey(nameof(IssueCategoryId))]
|
||||
public IssueCategory IssueCategory { get; set; }
|
||||
public IssueStatus Status { get; set; }
|
||||
public DateTime? ResovledDate { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
[ForeignKey(nameof(UserReported))]
|
||||
public string UserReportedId { get; set; }
|
||||
public OmbiUser UserReported { get; set; }
|
||||
|
|
1152
src/Ombi.Store/Migrations/OmbiMySql/20200516194814_IssueCreatedDate.Designer.cs
generated
Normal file
1152
src/Ombi.Store/Migrations/OmbiMySql/20200516194814_IssueCreatedDate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Ombi.Store.Migrations.OmbiMySql
|
||||
{
|
||||
public partial class IssueCreatedDate : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "CreatedDate",
|
||||
table: "Issues",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CreatedDate",
|
||||
table: "Issues");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -595,9 +595,6 @@ namespace Ombi.Store.Migrations.OmbiMySql
|
|||
b.Property<string>("Description")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<int>("EpisodeNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IssueCategoryId")
|
||||
.HasColumnType("int");
|
||||
|
||||
|
@ -616,9 +613,6 @@ namespace Ombi.Store.Migrations.OmbiMySql
|
|||
b.Property<DateTime?>("ResovledDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
|
|
1151
src/Ombi.Store/Migrations/OmbiSqlite/20200516200222_IssueCreatedDate.Designer.cs
generated
Normal file
1151
src/Ombi.Store/Migrations/OmbiSqlite/20200516200222_IssueCreatedDate.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Ombi.Store.Migrations.OmbiSqlite
|
||||
{
|
||||
public partial class IssueCreatedDate : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "CreatedDate",
|
||||
table: "Issues",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CreatedDate",
|
||||
table: "Issues");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -591,11 +591,11 @@ namespace Ombi.Store.Migrations.OmbiSqlite
|
|||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Description")
|
||||
b.Property<DateTime>("CreatedDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("EpisodeNumber")
|
||||
.HasColumnType("INTEGER");
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("IssueCategoryId")
|
||||
.HasColumnType("INTEGER");
|
||||
|
@ -615,9 +615,6 @@ namespace Ombi.Store.Migrations.OmbiSqlite
|
|||
b.Property<DateTime?>("ResovledDate")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("SeasonNumber")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ namespace Ombi.Controllers.V1
|
|||
public async Task<int> CreateIssue([FromBody]Issues i)
|
||||
{
|
||||
i.IssueCategory = null;
|
||||
|
||||
i.CreatedDate = DateTime.UtcNow;
|
||||
var username = User.Identity.Name.ToUpper();
|
||||
i.UserReportedId = (await _userManager.Users.FirstOrDefaultAsync(x => x.NormalizedUserName == username)).Id;
|
||||
await _issues.Add(i);
|
||||
|
@ -148,6 +148,7 @@ namespace Ombi.Controllers.V1
|
|||
Recipient = string.Empty,
|
||||
AdditionalInformation = $"{i.Subject} | {i.Description}",
|
||||
UserId = i.UserReportedId,
|
||||
|
||||
};
|
||||
|
||||
AddIssueNotificationSubstitutes(notificationModel, i, User.Identity.Name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue