Skip to content

Commit

Permalink
Use global uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
DearRude committed Mar 9, 2024
1 parent 680b41d commit 57a7542
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions handlers/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"time"

"github.com/gotd/td/telegram/message"
"github.com/gotd/td/telegram/uploader"
"github.com/gotd/td/tg"

"github.com/DearRude/siahe/database"
Expand Down Expand Up @@ -312,7 +311,7 @@ func exportUsers(u in.UpdateMessage) (*message.UploadedDocumentBuilder, error) {
return nil, err
}

up, err := uploader.NewUploader(client).FromBytes(u.Ctx, "users.csv", buf.Bytes())
up, err := upper.FromBytes(u.Ctx, "users.csv", buf.Bytes())
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -380,7 +379,7 @@ func exportTickets(eventID int, u in.UpdateMessage) (*message.UploadedDocumentBu
return nil, err
}

up, err := uploader.NewUploader(client).FromBytes(u.Ctx, "tickets.csv", buf.Bytes())
up, err := upper.FromBytes(u.Ctx, "tickets.csv", buf.Bytes())
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 57a7542

Please sign in to comment.