removed unnecessary comments
This commit is contained in:
@@ -573,7 +573,6 @@ func Associations(w http.ResponseWriter, r *http.Request) {
|
||||
idStr := r.URL.Query().Get("id")
|
||||
projectIDStr := r.URL.Query().Get("project_id")
|
||||
|
||||
// Optionaler Filter: Alle Items für ein bestimmtes Projekt holen (?project_id=X)
|
||||
if projectIDStr != "" {
|
||||
pID, _ := strconv.Atoi(projectIDStr)
|
||||
rows, err := storage.DB.Query("SELECT id, item_id, project_id, quantity FROM project_items WHERE project_id = ?", pID)
|
||||
@@ -593,7 +592,6 @@ func Associations(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// Einzelne Assoziation anhand der Tabellen-ID (?id=X)
|
||||
if idStr != "" {
|
||||
id, _ := strconv.Atoi(idStr)
|
||||
var pi models.ProjectItem
|
||||
@@ -607,7 +605,6 @@ func Associations(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// Gar kein Parameter -> Komplett-Dump aller Zuweisungen
|
||||
rows, err := storage.DB.Query("SELECT id, item_id, project_id, quantity FROM project_items")
|
||||
if err != nil {
|
||||
http.Error(w, "Internal server error", http.StatusInternalServerError)
|
||||
|
||||
Reference in New Issue
Block a user