Files: refactor

This commit is contained in:
Maksim Chegulov 2023-02-21 19:39:00 +03:00
parent f1d98ce6fd
commit ca2c9e8b57
4 changed files with 5 additions and 5 deletions

View File

@ -2627,7 +2627,7 @@ public class FileStorageService<T> //: IFileStorageService
{
Access = share,
Id = linkId,
SubjectType = SubjectType.InvintationLink,
SubjectType = SubjectType.InvitationLink,
FileShareOptions = new FileShareOptions
{
Title = title,

View File

@ -37,7 +37,7 @@ public class FileShareRecord : IMapFrom<DbFilesSecurity>
public FileShare Share { get; set; }
public FileShareOptions FileShareOptions { get; set; }
public int Level { get; set; }
public bool IsLink => SubjectType == SubjectType.InvintationLink || SubjectType == SubjectType.ExternalLink;
public bool IsLink => SubjectType == SubjectType.InvitationLink || SubjectType == SubjectType.ExternalLink;
public void Mapping(AutoMapper.Profile profile)
{
@ -75,4 +75,4 @@ public class SmallShareRecord
public DateTime TimeStamp { get; set; }
public FileShare Share { get; set; }
public SubjectType SubjectType { get; set; }
}
}

View File

@ -31,5 +31,5 @@ public enum SubjectType
UserOrGroup = 0,
ExternalLink = 1,
Restriction = 2,
InvintationLink = 3,
InvitationLink = 3,
}

View File

@ -110,7 +110,7 @@ public class RoomLinkService
{
var securityDao = _daoFactory.GetSecurityDao<int>();
var share = await securityDao.GetSharesAsync(new[] { key })
.Where(s => s.SubjectType == SubjectType.InvintationLink)
.Where(s => s.SubjectType == SubjectType.InvitationLink)
.FirstOrDefaultAsync();
return share;