Example #1
0
func (*Machines) Post(ctx *jas.Context) {
	log.Println("Machines.Post")

	var machine models.Machine
	ctx.Unmarshal(&machine)

	u4, _ := uuid.NewV4()
	machine.UUID = u4.String()

	go machine.Save()
	ctx.Data = machine
}