fix: align backend APIs and upload flow
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using AutoMapper;
|
||||
using AutoMapper;
|
||||
using GroupService.Domain.IReposities;
|
||||
using GroupService.Domain.ValueObjects;
|
||||
using GroupService.WebApi.Application.Dtos;
|
||||
@@ -46,7 +46,7 @@ namespace GroupService.WebApi.Application.GroupInvitation
|
||||
return Result.Success(mapper.Map<GroupInvitationResponse>(existing));
|
||||
}
|
||||
|
||||
var group = await groupReposity.FindByIdAsync(groupId);
|
||||
var group = await groupReposity.FindByIdAsync(groupId); if (group?.Status != Domain.Enums.GroupState.Normal) throw new IM.DomainCommons.DomainException("群组不可用或已被封禁");
|
||||
|
||||
var userProfile = new UserProfile()
|
||||
{
|
||||
@@ -75,7 +75,7 @@ namespace GroupService.WebApi.Application.GroupInvitation
|
||||
|
||||
public async Task<Result<object>> CreateBatchAsync(Guid operatorId, List<Guid> userIds, Guid groupId)
|
||||
{
|
||||
var group = await groupReposity.FindByIdAsync(groupId);
|
||||
var group = await groupReposity.FindByIdAsync(groupId); if (group?.Status != Domain.Enums.GroupState.Normal) throw new IM.DomainCommons.DomainException("群组不可用或已被封禁");
|
||||
if (group is null)
|
||||
return Result.Fail(ResultCode.GROUP_NOT_FOUND);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user