feat: use db

This commit is contained in:
Rogee
2024-09-02 18:01:38 +08:00
parent 472fe2ffaf
commit 98cd1a0365
18 changed files with 477 additions and 136 deletions

View File

@@ -51,8 +51,8 @@ func exportCmd(ctx context.Context) error {
return errors.New("channel not found")
}
cfg := NewChannelConfig(channel.GetID())
if err := cfg.Read(ctx); err != nil {
cfg := NewDBChannel(channel.GetID(), channel.Username, channel.Title)
if err := cfg.Get(ctx); err != nil {
return err
}