Upload files to "/"

This commit is contained in:
2025-12-22 15:13:52 +00:00
parent 6015ca963f
commit 0e53a7b269
264 changed files with 24582 additions and 3 deletions

22
database.go Normal file
View File

@@ -0,0 +1,22 @@
package db
import (
"angel_server/consts"
"database/sql"
"log"
_ "github.com/mattn/go-sqlite3"
)
func CheckLayer(db *sql.DB, layerID int) bool {
var exists bool
query := `SELECT EXISTS(SELECT 1 FROM layers WHERE layer_id = ?);`
err := consts.Db.QueryRow(query, layerID).Scan(&exists)
if err != nil {
log.Fatal(err)
}
return exists
}