田爽 4 kuukautta sitten
vanhempi
commit
a9e5b3f2b4
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      src/Hotline.Api/Controllers/SysController.cs

+ 2 - 2
src/Hotline.Api/Controllers/SysController.cs

@@ -489,8 +489,8 @@ namespace Hotline.Api.Controllers
         [HttpGet("common-list")]
         public async Task<IReadOnlyList<SystemCommonOpinion>> GetCommon([FromQuery] ECommonType commonType, bool isOpen)
         {
-            return await _commonOpinionRepository.Queryable().Where(x => x.CommonType == commonType && x.IsOpen == isOpen)
-                .WhereIF(isOpen == false, x => (x.CreatorId == _sessionContext.RequiredUserId && x.AttributionType == ECommonAttributionType.User) || (x.CreatorOrgId == _sessionContext.RequiredOrgId && x.AttributionType == ECommonAttributionType.Org )).ToListAsync();
+            return await _commonOpinionRepository.Queryable().Where(x => x.CommonType == commonType && (x.IsOpen == isOpen || (x.CreatorOrgId == _sessionContext.RequiredOrgId && x.AttributionType == ECommonAttributionType.Org)))
+                .WhereIF(isOpen == false, x => x.CreatorId == _sessionContext.RequiredUserId && x.AttributionType == ECommonAttributionType.User ).ToListAsync();
         }
 
         /// <summary>