Closed jmilkiewicz closed 11 months ago
adding soft delete
@pdambrauskas I removed controller and added an extra param to SubmitParams. SubmitParams is used BOTH for
permanent-sessions
of YAML so the context is already defined ,ie it is permanent sessionI am not really happy with this appraoch. I am not really familiar with micronaut but maybe to solve this there is sth like https://projectlombok.org/features/experimental/Delegate
. It would allow us to do sth like:
class RESTSubmitParams(){
@Delegate
private final SubmitParams submitParams;
private final Boolean permanent;
}
So from property binding all properties of SubmitParams would be "added" to RESTSubmitParams. Other option maybe would be to simply use inheritance:
class RESTSubmitParams extends SubmitParams(){
private final Boolean permanent;
....
}
WDYT ?
The approach with adding custom param to SubmitParams is here https://github.com/exacaster/lighter/pull/748/commits/ca3778dd49d85fe8a8096ac0ad84dcd7d6556dca
EDIT I went for inheritance which seems to look/work beter
I consider it is mostly done. @pdambrauskas @Minutis have a look
I've left some minor comments, other than that - nice job!
I've left some minor comments, other than that - nice job!
fixed comments
My draft implementation in which we can potentially support creating permanent session via REST API and YAML file. In case of conflict what we have in DB wins.