package main

import "fmt"

func CheckAPIJSONTags() {
	tasks := doRequest("GET", "/api/admin/task-center/tasks", nil)
	list, ok := tasks["list"].([]interface{})
	if !ok || len(list) == 0 {
		fmt.Println("No tasks found")
		return
	}
	firstTask, ok := list[0].(map[string]any)
	if !ok {
		fmt.Println("Invalid task list format")
		return
	}
	taskID := int64(firstTask["id"].(float64))
	fmt.Printf("Checking Task ID: %d\n", taskID)

	fmt.Println("\n--- Checking Tiers API ---")
	tiersRaw := doRequestRaw("GET", fmt.Sprintf("/api/admin/task-center/tasks/%d/tiers", taskID), nil)
	fmt.Println(string(tiersRaw))

	fmt.Println("\n--- Checking Rewards API ---")
	rewardsRaw := doRequestRaw("GET", fmt.Sprintf("/api/admin/task-center/tasks/%d/rewards", taskID), nil)
	fmt.Println(string(rewardsRaw))
}
