SES-148 Endpointy dla Armor i Weapon #71

Merged
s426134 merged 11 commits from SES-148 into dev 2021-01-14 16:45:05 +01:00
Owner
No description provided.
s426135 self-assigned this 2021-01-12 23:28:39 +01:00
s426135 requested review from s426134 2021-01-12 23:28:47 +01:00
s426135 changed title from WIP: SES-148 Endpointy dla Armor i Weapon to SES-148 Endpointy dla Armor i Weapon 2021-01-13 19:29:42 +01:00
s426134 requested changes 2021-01-13 21:39:08 +01:00
@ -26,0 +41,4 @@
}
if (armorToUse is null)
return new ErrorResponse() { StatusCode = 204, Message = "No weapon to change to" };
Collaborator

weapon ? xd

weapon ? xd
s426135 marked this conversation as resolved
@ -26,0 +50,4 @@
{
await Repository.Update(armorToUse);
await Repository.Save();
return new SuccessResponse("Character weapon updated") { SuccessCode = 200 };
Collaborator

weapon ? xd

weapon ? xd
s426135 marked this conversation as resolved
@ -26,0 +65,4 @@
await Repository.Update(armorInUse);
await Repository.Update(armorToUse);
await Repository.Save();
return new SuccessResponse("Character weapon updated") { SuccessCode = 204 };
Collaborator

weapon ? xd

weapon ? xd
s426135 marked this conversation as resolved
@ -33,0 +36,4 @@
public async Task<Either<SuccessResponse,ErrorResponse>> ChangeCharacterWeapon(CharacterWeaponViewModel model)
{
// Dodaj optional rozbro postac
var allWeapons = await Repository.Get(c => c.CharacterId.Equals(model.CharacterId)).AsNoTracking().ToListAsync();
Collaborator

można to wszystko skrócić dodając lub, czyli c.CharacterId.Equals(model.CharacterId) && ( jestWLewej || jestWPrawej || jest równa weapon id z modelu )

można to wszystko skrócić dodając lub, czyli c.CharacterId.Equals(model.CharacterId) && ( jestWLewej || jestWPrawej || jest równa weapon id z modelu )
Author
Owner

Neh, tego potrzeba tak jak jest, musze miec wszystkie bronie jakie są, aby mieć dostęp do Id

Neh, tego potrzeba tak jak jest, musze miec wszystkie bronie jakie są, aby mieć dostęp do Id
@ -33,0 +37,4 @@
{
// Dodaj optional rozbro postac
var allWeapons = await Repository.Get(c => c.CharacterId.Equals(model.CharacterId)).AsNoTracking().ToListAsync();
//var weaponsInUse = await Repository.Get(c => c.CharacterId.Equals(model.CharacterId)).Where(w => w.InUse.Equals(true)).ToListAsync();
Collaborator

to chyba juz można wywalić :P

to chyba juz można wywalić :P
s426135 marked this conversation as resolved
@ -68,0 +68,4 @@
/// <summary>
/// Metoda zmienia uzywany armor danej postaci
/// </summary>
/// <param name="characterId"></param>
Collaborator

opisy :D

opisy :D
s426135 marked this conversation as resolved
@ -68,0 +82,4 @@
/// Metoda dodaje Armor do danej postaci
/// </summary>
/// <param name="characterArmorViewModel"></param>
/// <returns></returns>
Collaborator

brak returna

brak returna
s426135 marked this conversation as resolved
@ -68,0 +101,4 @@
}
/// <summary>
/// Metoda dodaje Weapon do danej postaci
Collaborator

prosze nie mieszać języka xd

prosze nie mieszać języka xd
s426135 marked this conversation as resolved
@ -68,0 +104,4 @@
/// Metoda dodaje Weapon do danej postaci
/// </summary>
/// <param name="characterWeaponViewModel"></param>
/// <returns></returns>
Collaborator

brak return

brak return
s426135 marked this conversation as resolved
@ -68,0 +125,4 @@
/// Metoda zmienia Weapon do danej postaci
/// </summary>
/// <param name="CharacterWeaponViewModel"></param>
/// <returns></returns>
Collaborator

brak return

brak return
s426135 marked this conversation as resolved
s426135 requested review from s426134 2021-01-13 21:55:53 +01:00
s426134 merged commit 2005670077 into dev 2021-01-14 16:45:04 +01:00
s426134 deleted branch SES-148 2021-01-14 16:45:09 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: s426135/session-companion#71
No description provided.