working commit

This commit is contained in:
2026-06-06 02:28:44 +02:00
parent 557aea269d
commit c96602e933
60 changed files with 2506 additions and 1273 deletions
+4 -4
View File
@@ -3,7 +3,7 @@ package maindb
import (
"context"
"mbase/app/descr"
"mbase/pkg/descr"
)
func (db *Database) InsertAccount(ctx context.Context, account *descr.Account) error {
@@ -19,7 +19,7 @@ func (db *Database) InsertAccount(ctx context.Context, account *descr.Account) e
return err
}
func (db *Database) UpdateAccountByID(ctx context.Context, accountID int64, account *descr.Account) error {
func (db *Database) UpdateAccountByID(ctx context.Context, accountID string, account *descr.Account) error {
var err error
request := `UPDATE account SET username = $1, passhash = $2, disabled = $3, updated_at = $4 WHERE id = $5`
@@ -52,7 +52,7 @@ func (db *Database) CompletedListAccounts(ctx context.Context) ([]descr.Account,
return res, err
}
func (db *Database) GetAccountByID(ctx context.Context, accountID int64) (bool, *descr.Account, error) {
func (db *Database) GetAccountByID(ctx context.Context, accountID string) (bool, *descr.Account, error) {
var err error
var res *descr.Account
var exists bool
@@ -91,7 +91,7 @@ func (db *Database) GetAccountByUsername(ctx context.Context, username string) (
return exists, res, err
}
func (db *Database) DeleteAccountByID(ctx context.Context, accountID int64) error {
func (db *Database) DeleteAccountByID(ctx context.Context, accountID string) error {
var err error
request := `DELETE FROM account WHERE id = $1`