Skip to content
Snippets Groups Projects
Commit c3a2e613 authored by L4168's avatar L4168
Browse files

added response codes

parent a78ac426
No related branches found
No related tags found
3 merge requests!59Development to master,!31Development,!29Json validation
......@@ -94,6 +94,7 @@ export class FactionService {
await this.game_PersonRepository.save(gamePerson);
return {
code: 201,
message: 'created new group',
};
}
......@@ -113,6 +114,7 @@ export class FactionService {
gamePerson.group = data.groupId;
await this.game_PersonRepository.save(gamePerson);
return {
code: 200,
message: 'Joined group',
};
}
......
......@@ -48,6 +48,7 @@ export class GameService {
});
await this.game_PersonRepository.insert(gamePerson);
return {
code: 201,
message: 'New game added',
};
}
......@@ -106,6 +107,7 @@ export class GameService {
// TO DO: ADD FLAGBOX LOCATION TO MAPDRAWING ENTITY
return {
code: 200,
message: 'Game updated',
};
}
......@@ -118,6 +120,7 @@ export class GameService {
// TODO: Delete factions from Faction table associated with the deleted game
await this.gameRepository.delete({ id });
return {
code: 200,
message: 'Game deleted',
};
}
......@@ -168,5 +171,9 @@ export class GameService {
await this.objectivePoint_HistoryRepository.insert(eventUpdate);
// send flagbox event to flagbox subscribers
this.notificationGateway.server.emit('flagbox', 'event update');
return {
code: 201,
message: 'OK',
};
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment