chore: return raw text for html (#782)

This commit is contained in:
boojack
2022-12-19 18:45:17 +08:00
committed by GitHub
parent 6c17f94ef6
commit b704c20809
2 changed files with 42 additions and 43 deletions

View File

@@ -43,11 +43,10 @@ func (db *DB) Open(ctx context.Context) (err error) {
}
// Connect to the database without foreign_key.
sqliteDB, err := sql.Open("sqlite3", db.profile.DSN+"?_foreign_keys=0")
sqliteDB, err := sql.Open("sqlite3", db.profile.DSN+"?cache=shared&_foreign_keys=0&_busy_timeout=9999999")
if err != nil {
return fmt.Errorf("failed to open db with dsn: %s, err: %w", db.profile.DSN, err)
}
sqliteDB.SetMaxOpenConns(1)
db.Db = sqliteDB
if db.profile.Mode == "dev" {