DEVELOPMENT ENVIRONMENT

~liljamo/felu

d42a0dff662231910094626e5595a9980affa260 — Jonni Liljamo 1 year, 1 month ago a31d2cb
fix: don't fetch apikey in all domains
1 files changed, 2 insertions(+), 2 deletions(-)

M internal/db/domains.go
M internal/db/domains.go => internal/db/domains.go +2 -2
@@ 53,7 53,7 @@ func FetchDomainsForUser(userId string) ([]Domain, error) {
}

func FetchAllDomains() ([]Domain, error) {
	rows, err := DBConn.Query(`SELECT id, apikey, ddns_domain, a_record, owner
	rows, err := DBConn.Query(`SELECT id, ddns_domain, a_record, owner
		FROM domains`)
	if err != nil {
		return nil, err


@@ 63,7 63,7 @@ func FetchAllDomains() ([]Domain, error) {
	var domains []Domain
	for rows.Next() {
		var domain Domain
		err = rows.Scan(&domain.Id, &domain.ApiKey, &domain.Domain, &domain.A, &domain.Owner.ID)
		err = rows.Scan(&domain.Id, &domain.Domain, &domain.A, &domain.Owner.ID)
		if err != nil {
			return nil, err
		}