✨ ali path and link
This commit is contained in:
@ -15,6 +15,7 @@ type Account struct {
|
||||
Status string
|
||||
CronId int
|
||||
DriveId string
|
||||
Limit int `json:"limit"`
|
||||
OrderBy string `json:"order_by"`
|
||||
OrderDirection string `json:"order_direction"`
|
||||
}
|
||||
@ -79,4 +80,3 @@ func GetAccounts() []*Account {
|
||||
}
|
||||
return accounts
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,20 @@
|
||||
package model
|
||||
|
||||
import "github.com/Xhofe/alist/conf"
|
||||
|
||||
type Meta struct {
|
||||
Path string `json:"path" gorm:"primaryKey"`
|
||||
Password string `json:"password"`
|
||||
Hide bool `json:"hide"`
|
||||
Ignore bool `json:"ignore"`
|
||||
}
|
||||
|
||||
func GetMetaByPath(path string) (*Meta,error) {
|
||||
var meta Meta
|
||||
meta.Path = path
|
||||
err := conf.DB.First(&meta).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &meta, nil
|
||||
}
|
Reference in New Issue
Block a user