package service

import (
	"cc-officialweb/models"
	"cc-officialweb/utils"
)

func GetAllLinks() (links []models.Link) {
	tx := utils.DB.Order("sort desc").Find(&links)
	if tx.RowsAffected > 0 {
		return links
	} else {
		return nil
	}
}
