Go binary/server for helping run/build sessions for the Maze Rats TTRPG
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

19 lines
457 B

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())
}