Skip to content

Commit

Permalink
Merge pull request #146 from SingularityNET-Archive:development
Browse files Browse the repository at this point in the history
refactor: Filter approved names and sort them in ascending order in getNames function
  • Loading branch information
Andre-Diamond authored Nov 11, 2024
2 parents da19211 + 69f9b6b commit 86cad38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/getNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export async function getNames() {
try {
const { data, error, status } = await supabase
.from('names')
.select('name');
.select('name')
.eq('approved', true)
.order('name', { ascending: true });

if (error && status !== 406) throw error
if (data) {
Expand Down

0 comments on commit 86cad38

Please sign in to comment.