cleanup
This commit is contained in:
@@ -67,7 +67,7 @@ func createSingleTorrentResponse(basePath string, torrents []torrent.Torrent, t
|
||||
torrentResponses = append(torrentResponses, dav.File(
|
||||
filePath,
|
||||
file.Bytes,
|
||||
convertDate(torrent.Added),
|
||||
convertRFC3339toRFC1123(torrent.Added),
|
||||
file.Link,
|
||||
))
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"github.com/debridmediamanager.com/zurg/internal/torrent"
|
||||
)
|
||||
|
||||
// convertDate converts a date from RFC3339 to RFC1123
|
||||
func convertDate(input string) string {
|
||||
// convertRFC3339toRFC1123 converts a date from RFC3339 to RFC1123
|
||||
func convertRFC3339toRFC1123(input string) string {
|
||||
t, err := time.Parse(time.RFC3339, input)
|
||||
if err != nil {
|
||||
log.Println("Error:", err)
|
||||
|
||||
Reference in New Issue
Block a user