SES-164 Ujednolicenie Api response #82

Merged
s426134 merged 3 commits from SES-164 into dev 2021-01-22 08:40:26 +01:00
3 changed files with 5 additions and 5 deletions
Showing only changes of commit 3a8090dab7 - Show all commits

View File

@ -50,7 +50,7 @@ namespace SessionCompanion.Services.Services
{ {
await Repository.Update(armorToUse); await Repository.Update(armorToUse);
await Repository.Save(); await Repository.Save();
return new SuccessResponse("Character armor updated") { SuccessCode = 200 }; return new SuccessResponse("Character armor updated") { StatusCode = 200 };
} }
catch (Exception e) catch (Exception e)
{ {
@ -65,7 +65,7 @@ namespace SessionCompanion.Services.Services
await Repository.Update(armorInUse); await Repository.Update(armorInUse);
await Repository.Update(armorToUse); await Repository.Update(armorToUse);
await Repository.Save(); await Repository.Save();
return new SuccessResponse("Character armor updated") { SuccessCode = 204 }; return new SuccessResponse("Character armor updated") { StatusCode = 204 };
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -147,7 +147,7 @@ namespace SessionCompanion.Controllers
try try
{ {
await _service.CreateCharactersFromTemplate(characterId, userId, newName); await _service.CreateCharactersFromTemplate(characterId, userId, newName);
return new SuccessResponse("Character created") { SuccessCode = 200 }; return new SuccessResponse("Character created") { StatusCode = 200 };
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -92,7 +92,7 @@ namespace SessionCompanion.Controllers
{ {
await _characterArmorService.Create(characterArmorViewModel); await _characterArmorService.Create(characterArmorViewModel);
await _characterArmorService.SaveAsync(); await _characterArmorService.SaveAsync();
return new SuccessResponse("Armor added to character") { SuccessCode = 200 }; return new SuccessResponse("Armor added to character") { StatusCode = 200 };
} }
catch (Exception e) catch (Exception e)
{ {
@ -114,7 +114,7 @@ namespace SessionCompanion.Controllers
{ {
await _characterWeaponService.Create(characterWeaponViewModel); await _characterWeaponService.Create(characterWeaponViewModel);
await _characterWeaponService.SaveAsync(); await _characterWeaponService.SaveAsync();
return new SuccessResponse("Weapon added to character") { SuccessCode = 200 }; return new SuccessResponse("Weapon added to character") { StatusCode = 200 };
} }
catch (Exception e) catch (Exception e)
{ {