some file preview fixes

This commit is contained in:
2020-01-21 15:43:09 +01:00
parent df278b5e7d
commit 96fe2ce1f6
3 changed files with 31 additions and 60 deletions

View File

@@ -28,11 +28,6 @@ type FileInfo struct {
}
// GetFileInfo gets the FileInfo from the pixeldrain API
func (p *PixelAPI) GetFileInfo(id string, urlParam string) (resp *FileInfo, err error) {
resp = &FileInfo{}
err = p.jsonRequest("GET", p.apiEndpoint+"/file/"+id+"/info"+urlParam, resp)
if err != nil {
return nil, err
}
return resp, nil
func (p *PixelAPI) GetFileInfo(id string) (resp FileInfo, err error) {
return resp, p.jsonRequest("GET", p.apiEndpoint+"/file/"+id+"/info", &resp)
}