Revize 11f447b9
Přidáno uživatelem Vojtěch Bartička před asi 3 roky(ů)
Backend/Backend/Controllers/DocumentController.cs | ||
---|---|---|
65 | 65 |
{ |
66 | 66 |
documentService.AddDocuments(documentAddRequest, clientInfo.LoggedUser.Id); |
67 | 67 |
} |
68 |
catch (InvalidOperationException ex)
|
|
68 |
catch (InvalidOperationException) |
|
69 | 69 |
{ |
70 | 70 |
logger.Warning($"Error in DocumentService.AddDocuments - could not retrieve user with GUID {clientInfo.LoggedUser.Id} from database"); |
71 | 71 |
throw new InternalErrorException(); |
72 | 72 |
} |
73 |
catch (Exception ex)
|
|
73 |
catch (Exception) |
|
74 | 74 |
{ |
75 | 75 |
logger.Warning($"Error in DocumentService.AddDocuments - could not process ZIP file"); |
76 | 76 |
throw new BadRequestException("Invalid ZIP file"); |
Backend/Core/Entities/Document.cs | ||
---|---|---|
8 | 8 |
|
9 | 9 |
namespace Core.Entities |
10 | 10 |
{ |
11 |
#nullable disable |
|
11 | 12 |
public class Document : BaseEntity |
12 | 13 |
{ |
13 | 14 |
public string Name { get; set; } |
Backend/Core/Entities/TagCategory.cs | ||
---|---|---|
7 | 7 |
|
8 | 8 |
namespace Core.Entities |
9 | 9 |
{ |
10 |
#nullable disable |
|
10 | 11 |
public class TagCategory : BaseEntity |
11 | 12 |
{ |
12 | 13 |
public string Name { get; set; } |
Backend/Core/Entities/User.cs | ||
---|---|---|
9 | 9 |
|
10 | 10 |
namespace Core.Entities |
11 | 11 |
{ |
12 |
#nullable disable |
|
12 | 13 |
public class User : BaseEntity |
13 | 14 |
{ |
14 | 15 |
public string Username { get; set; } |
Backend/Models/Authentication/LoginResponse.cs | ||
---|---|---|
13 | 13 |
{ |
14 | 14 |
} |
15 | 15 |
|
16 |
#nullable disable |
|
16 | 17 |
public bool Ok { get; set; } |
17 | 18 |
public string Token { get; set; } |
18 | 19 |
public DateTime Expiration { get; set; } |
Backend/Models/Documents/DocumentAddInfo.cs | ||
---|---|---|
7 | 7 |
|
8 | 8 |
namespace Models.Documents; |
9 | 9 |
|
10 |
# nullable disable |
|
10 | 11 |
/** |
11 | 12 |
* If the file is plaintext, we except it to be a single document |
12 | 13 |
* If the file is base64, we expect it to be a ZIP file with plaintext documents in its root |
Backend/Models/Documents/DocumentAddRequest.cs | ||
---|---|---|
6 | 6 |
|
7 | 7 |
namespace Models.Documents; |
8 | 8 |
|
9 |
# nullable disable |
|
9 | 10 |
public class DocumentAddRequest |
10 | 11 |
{ |
11 | 12 |
public List<DocumentAddInfo> Documents { get; set; } |
Backend/Models/Documents/DocumentListInfo.cs | ||
---|---|---|
7 | 7 |
|
8 | 8 |
namespace Models.Documents; |
9 | 9 |
|
10 |
# nullable disable |
|
10 | 11 |
public class DocumentListInfo |
11 | 12 |
{ |
12 | 13 |
public Guid Id { get; set; } |
Backend/Models/Users/UserInfo.cs | ||
---|---|---|
6 | 6 |
|
7 | 7 |
namespace Models.Users |
8 | 8 |
{ |
9 |
# nullable disable |
|
9 | 10 |
public class UserInfo |
10 | 11 |
{ |
11 | 12 |
public Guid Id { get; set; } |
Také k dispozici: Unified diff
Code cleanup