public async Task <RiderDto> UpdateStatus([FromRoute] int id, [FromQuery] string statusId) { switch (statusId) { case EntityStatusConsts.WarningOne: await RiderAppService.WarnFirstAsync(id); break; case EntityStatusConsts.WarningTwo: await RiderAppService.WarnSecondAsync(id); break; case EntityStatusConsts.Blocked: await RiderAppService.BlockAsync(id); break; case "unblocked": await RiderAppService.UnblockAsync(id); break; default: throw new BusinessException("Invalid manager status"); } return(await RiderAppService.GetAsync(id)); }
public async Task <RiderDto> Get([FromRoute] int id) { return(await RiderAppService.GetAsync(id)); }