swag, for key chk

v0.1.30 v0.1.30
Vernon Keenan 2021-01-27 11:31:41 -08:00
parent c1b130c5c6
commit 18bebd0c09
4 changed files with 12 additions and 6 deletions

View File

@ -839,7 +839,7 @@ type TransactionsResponseValuesItems0CartItemsItems0 struct {
BatchID string `json:"batchId,omitempty"`
// batch sku
BatchSku float64 `json:"batchSku,omitempty"`
BatchSku string `json:"batchSku,omitempty"`
// calc cultivation tax
CalcCultivationTax float64 `json:"calcCultivationTax,omitempty"`

View File

@ -11,19 +11,25 @@ import (
var MyDB *sql.DB
// InitDB initializes the MySQL database using DSN information from the config file
// and disables foreign key check's because we maintain referential integreity to allow
// for mass batch input.
//
func InitDB() {
var db *sql.DB
var err error
if GetDBMS() == "mysql" {
db, err = sql.Open("mysql", GetDSN())
} else {
if GetDBMS() != "mysql" {
sugar.Fatalf("app.InitDB: 💣 ⛔ unknown DBMS: %s", GetDBMS())
return
}
db, err = sql.Open("mysql", GetDSN())
if err != nil {
sugar.Fatalf("app.InitDB: 💣 ⛔ Can't log on to DBMS host: %w", err)
return
}
_, err = db.Exec("set foreign_key_check=0")
if err != nil {
sugar.Warnf("app.InitDB: 💣⛔ can't disable foreign key check")
}
MyDB = db
sugar.Debugf("app.InitDB: 👍 📤 %s", GetDBMS())
}

View File

@ -6501,7 +6501,7 @@ definitions:
type: string
batchSku:
example: 0
type: number
type: string
calcCultivationTax:
example: 0
type: number

View File

@ -16,7 +16,7 @@ info:
contact:
email: "noc@taxnexus.net"
license:
name: "Proprietary"
name: "Proprietary - Copyright (c) 2018-2021 by Taxnexus, Inc."
termsOfService: "https://www.taxnexus.com/terms/"
description: |
# Taxnexus Vendor Gateway