feat: indexer irc order by name ASC (#65)

This commit is contained in:
GregTroar 2022-01-03 15:33:02 +01:00 committed by GitHub
parent b09796bf7e
commit d2aa7c1e7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -57,7 +57,7 @@ func (r *IndexerRepo) Update(indexer domain.Indexer) (*domain.Indexer, error) {
func (r *IndexerRepo) List() ([]domain.Indexer, error) { func (r *IndexerRepo) List() ([]domain.Indexer, error) {
rows, err := r.db.Query("SELECT id, enabled, name, identifier, settings FROM indexer") rows, err := r.db.Query("SELECT id, enabled, name, identifier, settings FROM indexer ORDER BY name ASC")
if err != nil { if err != nil {
log.Fatal().Err(err) log.Fatal().Err(err)
} }

View file

@ -111,7 +111,7 @@ func (ir *IrcRepo) FindActiveNetworks(ctx context.Context) ([]domain.IrcNetwork,
func (ir *IrcRepo) ListNetworks(ctx context.Context) ([]domain.IrcNetwork, error) { func (ir *IrcRepo) ListNetworks(ctx context.Context) ([]domain.IrcNetwork, error) {
rows, err := ir.db.QueryContext(ctx, "SELECT id, enabled, name, server, port, tls, pass, invite_command, nickserv_account, nickserv_password FROM irc_network") rows, err := ir.db.QueryContext(ctx, "SELECT id, enabled, name, server, port, tls, pass, invite_command, nickserv_account, nickserv_password FROM irc_network ORDER BY name ASC")
if err != nil { if err != nil {
log.Fatal().Err(err) log.Fatal().Err(err)
} }