package server

import (
	"music-server/pkg/db"
	"music-server/pkg/models"
)

func TestDB() {
	db.Testf()
}

func GetVersionHistory() models.VersionData {
	data := models.VersionData{Version: "3.2",
		Changelog: "Upgraded Go version and the version of all dependencies. Fixed som more bugs.",
		History: []models.VersionData{
			{
				Version:   "3.1",
				Changelog: "Fixed some bugs with songs not found made the application crash. Now checking if song exists and if not, remove song from DB and find another one. Frontend is now decoupled from the backend.",
			},
			{
				Version:   "3.0",
				Changelog: "Changed routing framework from mux to Gin. Swagger doc is now included in the application. A fronted can now be hosted from the application.",
			},
			{
				Version:   "2.3.0",
				Changelog: "Images should not be included in the database, removes songs where the path doesn't work.",
			},
			{
				Version:   "2.2.0",
				Changelog: "Changed the structure of the whole application, should be no changes to functionality.",
			},
			{
				Version:   "2.1.4",
				Changelog: "Game list should now be sorted, a new endpoint with the game list in random order have been added.",
			},
			{
				Version:   "2.1.3",
				Changelog: "Added a check to see if song exists before returning it, if not a new song will be picked up.",
			},
			{
				Version:   "2.1.2",
				Changelog: "Added test server to swagger file.",
			},
			{
				Version:   "2.1.1",
				Changelog: "Fixed bug where wrong song was showed as currently played.",
			},
			{
				Version: "2.1.0",
				Changelog: "Added /addQue to add the last received song to the songQue. " +
					"Changed /rand and /rand/low to not add song to the que. " +
					"Changed /next to not call /rand when the end of the que is reached, instead the last song in the que will be resent.",
			},
			{
				Version:   "2.0.3",
				Changelog: "Another small change that should fix the caching problem.",
			},
			{
				Version:   "2.0.2",
				Changelog: "Hopefully fixed the caching problem with random.",
			},
			{
				Version:   "2.0.1",
				Changelog: "Fixed CORS",
			},
			{
				Version:   "2.0.0",
				Changelog: "Rebuilt the application in Go.",
			},
		},
	}
	return data
}
