Skip to content

Commit

Permalink
improved backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Glowman554 committed Nov 9, 2024
1 parent 5129e63 commit d72f477
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 138 deletions.
173 changes: 49 additions & 124 deletions fire/client/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fire/command/commands/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (Delete) Execute(parser *arguments.Parser) error {
return err
}
fmt.Println("deleting version...")
err = c.Remote.DeletePackageVersion(context.Background(), *pkg, client.RemoteDeletePackageVersionProps{Version: *version})
err = c.Remote.DeletePackageVersion(context.Background(), *pkg, *version)
if err != nil {
return err
}
Expand Down
4 changes: 1 addition & 3 deletions fire/command/commands/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ func (Deploy) Execute(parser *arguments.Parser) error {
return err
}

return c.Remote.UploadFile(context.Background(), proj.Name, client.RemoteUploadFileProps{
Name: path,
Version: proj.Version,
return c.Remote.UploadFile(context.Background(), proj.Name, proj.Version, strings.Split(path, "/"), client.RemoteUploadFileProps{
Content: string(data),
})
}
Expand Down
4 changes: 2 additions & 2 deletions fire/command/commands/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ func (Get) Execute(parser *arguments.Parser) error {
return err
}

files, err := c.Remote.ListFiles(context.Background(), *pkg, client.RemoteListFilesProps{Version: *version})
files, err := c.Remote.ListFiles(context.Background(), *pkg, *version)
if err != nil {
return err
}

output := *pkg + "@" + *version + "/"

for _, file := range files.Files {
content, err := c.Remote.LoadFile(context.Background(), *pkg, client.RemoteLoadFileProps{Version: *version, Name: file})
content, err := c.Remote.LoadFile(context.Background(), *pkg, *version, strings.Split(file, "/"))
if err != nil {
return err
}
Expand Down
Loading

0 comments on commit d72f477

Please sign in to comment.