-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MARXAN - 448 Cost surface - scenarioId guard #241
Conversation
This pull request is being automatically deployed with Vercel (learn more). marxan – ./app🔍 Inspect: https://vercel.com/vizzuality1/marxan/CNaCwLFa1z3JhJg73ui1CD4i4Kdh marxan-storybook – ./app🔍 Inspect: https://vercel.com/vizzuality1/marxan-storybook/CFncvb7TUXcHWsjuPmLVQxbSMMU1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kgajowy nice cleanup, thank you!
see suggestion about sticking to existing naming convention for services (I think yours was simply a typo here) and about a pagination that was removed - once you've taken care of these, feel free to merge, thanks.
import { UpdateScenarioPlanningUnitLockStatusDto } from './dto/update-scenario-planning-unit-lock-status.dto'; | ||
|
||
@Injectable() | ||
export class ScenarioService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to stick to <Plural>Service
(as for the recently-refactored ProjectsService
), and <Plural>CrudService
(this is already ok in this PR for ScenariosCrudService
). Filename to be adjusted accordingly here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hotzevzl I actually forgot to mention this but I have done this "miss" on purpose - to have a clean diff (otherwise git would mess with diff merging new/old content).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(as you already reviewed, will change it in this PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const results = await this.service.findAll(fetchSpecification); | ||
return this.scenarioSerializer.serialize(results.data, results.metadata); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should keep pagination here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async findAll(fetchSpecification: FetchSpecification) {
return this.crudService.findAllPaginated(fetchSpecification);
}
we do 🤔
Will change tho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to
projects
:crud-service
and wrap existing functions,scenarioId
received existingguard
which verifies existence of given Scenario,