From ecba7f726f70b37126d852c38c7e3eec7b04d730 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 9 Jul 2026 22:15:54 -0400 Subject: feat: old standalone trigger systems completely unified into trigger->condition->action system --- internal/admin/api_room_courses.go | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'internal/admin/api_room_courses.go') diff --git a/internal/admin/api_room_courses.go b/internal/admin/api_room_courses.go index e4cf849..097b9e8 100644 --- a/internal/admin/api_room_courses.go +++ b/internal/admin/api_room_courses.go @@ -290,15 +290,15 @@ func (s *AdminServer) handleRoomCourse(w http.ResponseWriter, r *http.Request, r m["id"] = id delete(m, "_raw") writeJSON(w, map[string]any{ - "course": m, - "course_id": id, - "course_name": m["name"], - "obstacle_index": idx, - "total_obstacles": len(obstacles), - "obstacle": obstacles[idx], - "obstacles": obstacles, - "_raw": string(raw), - "room_id": roomID, + "course": m, + "course_id": id, + "course_name": m["name"], + "obstacle_index": idx, + "total_obstacles": len(obstacles), + "obstacle": obstacles[idx], + "obstacles": obstacles, + "_raw": string(raw), + "room_id": roomID, }) return } @@ -565,8 +565,6 @@ func exitIsAlwaysBlocked(v any) bool { return false } - - // isHorizontalDir returns whether d is one of the 8 horizontal directions. func isHorizontalDir(d string) bool { for _, h := range horizontalExitDirs { @@ -577,8 +575,6 @@ func isHorizontalDir(d string) bool { return false } - - // reconcileExitOnRoom validates that roomID has an exit in dir. // If expectedTarget > 0, also checks the exit points to that room. // Returns an error string or empty string on success. @@ -627,4 +623,4 @@ func (s *AdminServer) reconcileCourseExits(m map[string]any) []string { } return warnings -} \ No newline at end of file +} -- cgit v1.2.3