correção do bug de criação de inventario

This commit is contained in:
2025-06-26 16:29:52 -03:00
parent efb3229ad1
commit 97a5c41d5f
2 changed files with 1 additions and 1 deletions

Binary file not shown.

View File

@@ -68,7 +68,7 @@ func registrar(c echo.Context) error {
return jsonError(c, http.StatusInternalServerError, "erro ao criar inventario de poderes do player: "+player)
}
query = fmt.Sprintf(`CREATE TABLE inv_%s (id INT NOT NULL AUTO_INCREMENT, item_nome VARCHAR(30) NOT NULL , quantidade INT NOT NULL DEFAULT '1' , item_peso INT NOT NULL DEFAULT '1' , item_durabilit BOOLEAN NOT NULL DEFAULT FALSE ) ENGINE = InnoDB;`, player)
query = fmt.Sprintf("CREATE TABLE inv_%s (id INT NOT NULL AUTO_INCREMENT, item_nome VARCHAR(30) NOT NULL, quantidade INT NOT NULL DEFAULT '1', item_peso INT NOT NULL DEFAULT '1', item_durabilit BOOLEAN NOT NULL DEFAULT FALSE, PRIMARY KEY (`id`)) ENGINE = InnoDB;", player)
newInv, err := db.Query(query)
if err != nil {
return jsonError(c, http.StatusInternalServerError, "erro ao criar o inventario do player: "+player)