package handlers import ( "mazeratsgen/internal/dice" "mazeratsgen/internal/tables" "net/http" "time" ) // @Summary Generate a potion // @Tags treasure // @Produce application/json, text/plain // @Method GET // @Router /api/generate/potion [get] // @Success 200 func GenPotion(w http.ResponseWriter, r *http.Request) { t := tables.TreasureTable{Roller: dice.NewRoller(time.Now().UnixNano())} WriteResponse(w, r, t.GenPotion(), t.PotionTemplate()) }