Add newclear endpoint
This commit is contained in:
1 parent
e97e5f73d5
commit
2704e64e38
6 files changed
+91
-3
No files matched your search
+11
-1
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/pagefaultgames/rogueserver/defs"
|
||||
)
|
||||
|
||||
func TryAddDailyRunCompletion(uuid []byte, seed string, mode int) (bool, error) {
|
||||
func TryAddSeedCompletion(uuid []byte, seed string, mode int) (bool, error) {
|
||||
var count int
|
||||
err := handle.QueryRow("SELECT COUNT(*) FROM dailyRunCompletions WHERE uuid = ? AND seed = ?", uuid, seed).Scan(&count)
|
||||
if err != nil {
|
||||
@@ -41,6 +41,16 @@ func TryAddDailyRunCompletion(uuid []byte, seed string, mode int) (bool, error)
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func ReadSeedCompleted(uuid []byte, seed string) (bool, error) {
|
||||
var count int
|
||||
err := handle.QueryRow("SELECT COUNT(*) FROM dailyRunCompletions WHERE uuid = ? AND seed = ?", uuid, seed).Scan(&count)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
return count > 0, nil
|
||||
}
|
||||
|
||||
func ReadSystemSaveData(uuid []byte) (defs.SystemSaveData, error) {
|
||||
var system defs.SystemSaveData
|
||||
|
||||
|
||||
Reference in new issue
Block a user