Closed juliangruendner closed 8 months ago
After discussing the possible complications and confusion with potentially late or already deleted result numbers, we decided to change this slightly. The total number of results will be provided by the GUI when sending the POST request to save a query. This introduces the possibility of fraudulent result numbers being sent by the GUI with no chance of verifying them in the backend, but since there is no real threat in that and it was decided to accept that.
This change needs to be reflected in the GUI as well (ping @Shayan1375 @thkoehler11 )
The backend should be extended to allow a user to save up to n queries (n configurable via env var) for use in a project proposal.
When a user saves a query for a project proposal the overall result (sum results across all sites) should be saved. It should only be possible to save a result if the overall result > PRIVACY_THRESHOLD_RESULTS.
When the user then later adds the saved query to the proposal component it should be possible for the proposal component to query the feasibility backend api with a query id to get the overall result for the specifc saved query.
Potentially the /summary-result endpoint could exactly fulfill the requirement without having to change it - please check if this is the case.
Things to implement as part of the issue: