Skip to content

Commit

Permalink
Response empty slice instead of nil
Browse files Browse the repository at this point in the history
  • Loading branch information
SeraphJACK committed Sep 16, 2023
1 parent 5b2cea3 commit 9043627
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions services/playlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ package services

import (
"errors"
"net/http"
"strconv"
"time"

"github.com/ProjectAnni/anniv-go/meta"
"github.com/ProjectAnni/anniv-go/model"
"github.com/gin-gonic/gin"
"github.com/mitchellh/mapstructure"
"gorm.io/gorm"
"gorm.io/gorm/clause"
"net/http"
"strconv"
"time"
)

type PatchedPlaylistInfo struct {
Expand Down Expand Up @@ -463,6 +464,7 @@ func playlistInfo(p model.Playlist) PlaylistInfo {
func queryPlaylist(p model.Playlist) (*PlaylistDetails, error) {
ret := PlaylistDetails{
PlaylistInfo: playlistInfo(p),
Items: []PlaylistItemWithId{},
}

var songs []model.PlaylistSong
Expand Down

0 comments on commit 9043627

Please sign in to comment.