Checkpoint: deleting is working
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
@ -23,8 +23,22 @@ public class ExchangeService {
|
||||
public Exchange save(Exchange exchange){
|
||||
return this.repo.save(exchange);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param id Id of exchange in database
|
||||
* @return Optional Exchange if found
|
||||
*/
|
||||
public Optional<Exchange> getById(Long id){
|
||||
return this.repo.findById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param entity Exchange entity which we would like to delete
|
||||
*/
|
||||
public void deleteExchange(Exchange entity){
|
||||
this.repo.delete(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param assignment Assignment to trade for
|
||||
* @param group Desired group
|
||||
|
Reference in New Issue
Block a user