♻️ Use paperclip to store avatar and more
This commit is contained in:
@ -1,11 +1,9 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/samber/lo"
|
||||
"github.com/spf13/viper"
|
||||
"gorm.io/datatypes"
|
||||
)
|
||||
|
||||
@ -47,16 +45,6 @@ func (v Account) GetPrimaryEmail() AccountContact {
|
||||
return val
|
||||
}
|
||||
|
||||
func (v Account) GetAvatarPath() string {
|
||||
basepath := viper.GetString("content")
|
||||
return filepath.Join(basepath, v.Avatar)
|
||||
}
|
||||
|
||||
func (v Account) GetBannerPath() string {
|
||||
basepath := viper.GetString("content")
|
||||
return filepath.Join(basepath, v.Banner)
|
||||
}
|
||||
|
||||
type AccountContactType = int8
|
||||
|
||||
const (
|
||||
|
Reference in New Issue
Block a user