Skip to content
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

Fix Species Capitilization (and order by) #164

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions backend/db/migrations/R__Code-table-description-updates.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- species
UPDATE species_code set short_description = 'Grizzly Bear', long_description = 'Grizzly Bear' WHERE species_code = 'GRZBEAR';
UPDATE species_code set short_description = 'Hog/Pig/Boar (Feral)', long_description = 'Hog/Pig/Boar (Feral)' WHERE species_code = 'FERALHOG';
UPDATE species_code set short_description = 'Mountain Goat', long_description = 'Mountain Goat' WHERE species_code = 'MTNGOAT';
UPDATE species_code set short_description = 'River Otter', long_description = 'River Otter' WHERE species_code = 'RVROTTER';
4 changes: 3 additions & 1 deletion backend/src/v1/species_code/species_code.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export class SpeciesCodeService {
}

async findAll(): Promise<SpeciesCode[]> {
return this.speciesCodeRepository.find();
return (await this.speciesCodeRepository.find(
{order: {display_order: "ASC"}}
));
}

async findOne(id: string): Promise<SpeciesCode> {
Expand Down
Loading