public async Task SetStatusForUser(int accountId, [FromBody] SetStatusModel model)
        {
            await _accountService.SetStatusAsync(accountId, model.Status);

            var eventModel = new StatusProfileChanged {
                Status = model.Status
            };

            if (model.Type == AccountType.Jobseeker)
            {
                eventModel.JobseekerId = accountId;
            }
            else if (model.Type == AccountType.Recruiter)
            {
                eventModel.RecruiterId = accountId;
            }
            await _rawRabbitBus.PublishAsync(eventModel);
        }
示例#2
0
 public async Task SetProductStatus([FromRoute] Guid productGuid, [FromBody] SetStatusModel model)
 {
     await _productService.SetStatus(productGuid, model.DeliveryStatus);
 }