feat: migrate pocketbase to v0.23

This commit is contained in:
Fu Diwei
2025-01-18 05:22:18 +08:00
parent 1568e5a2a7
commit 32f9c95dd0
46 changed files with 632 additions and 674 deletions

View File

@@ -17,7 +17,7 @@ func NewSettingsRepository() *SettingsRepository {
}
func (r *SettingsRepository) GetByName(ctx context.Context, name string) (*domain.Settings, error) {
record, err := app.GetApp().Dao().FindFirstRecordByFilter(
record, err := app.GetApp().FindFirstRecordByFilter(
"settings",
"name={:name}",
dbx.Params{"name": name},
@@ -31,9 +31,9 @@ func (r *SettingsRepository) GetByName(ctx context.Context, name string) (*domai
settings := &domain.Settings{
Meta: domain.Meta{
Id: record.GetId(),
CreatedAt: record.GetCreated().Time(),
UpdatedAt: record.GetUpdated().Time(),
Id: record.Id,
CreatedAt: record.GetDateTime("created").Time(),
UpdatedAt: record.GetDateTime("updated").Time(),
},
Name: record.GetString("name"),
Content: record.GetString("content"),