linting and bugfixing
This commit is contained in:
@@ -109,13 +109,13 @@ func CreateServiceHandler(w http.ResponseWriter, r *http.Request) {
|
||||
// Insert new service
|
||||
query := `
|
||||
INSERT INTO services (
|
||||
name, description, price, duration_minutes,
|
||||
name, description, price, duration_minutes,
|
||||
patch_test_duration_hours, minimum_age_required, created_by
|
||||
)
|
||||
)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7)
|
||||
RETURNING
|
||||
RETURNING
|
||||
id, name, description, price, duration_minutes, is_active,
|
||||
patch_test_duration_hours, minimum_age_required, created_at,
|
||||
patch_test_duration_hours, minimum_age_required, created_at,
|
||||
created_by
|
||||
`
|
||||
|
||||
@@ -200,7 +200,7 @@ func DeleteServiceHandler(w http.ResponseWriter, r *http.Request) {
|
||||
func ServicesHandler(w http.ResponseWriter, r *http.Request) {
|
||||
// Query all active services
|
||||
query := `
|
||||
SELECT id, name, description, price, duration_minutes,
|
||||
SELECT id, name, description, price, duration_minutes,
|
||||
patch_test_duration_hours, minimum_age_required
|
||||
FROM services
|
||||
WHERE is_active = TRUE
|
||||
@@ -261,7 +261,7 @@ func ServicesHandler(w http.ResponseWriter, r *http.Request) {
|
||||
func AllServicesHandler(w http.ResponseWriter, r *http.Request) {
|
||||
// Query all services including inactive ones
|
||||
query := `
|
||||
SELECT id, name, description, price, duration_minutes, is_active,
|
||||
SELECT id, name, description, price, duration_minutes, is_active,
|
||||
patch_test_duration_hours, minimum_age_required, created_at, created_by
|
||||
FROM services
|
||||
ORDER BY is_active DESC, name
|
||||
|
||||
Reference in New Issue
Block a user