Skip to content

Commit

Permalink
Fix Species Capitilization (and order by)
Browse files Browse the repository at this point in the history
  • Loading branch information
afwilcox committed Oct 18, 2023
1 parent 5e8cf2d commit bd9f25d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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

0 comments on commit bd9f25d

Please sign in to comment.