mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: re-save shared folder to user's space
This commit is contained in:
@@ -108,6 +108,13 @@ func (user *User) PayScore(score int) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// AddScore 增加积分
|
||||
// todo 测试
|
||||
func (user *User) AddScore(score int) {
|
||||
user.Score += score
|
||||
DB.Model(user).UpdateColumn("score", gorm.Expr("score + ?", score))
|
||||
}
|
||||
|
||||
// IncreaseStorageWithoutCheck 忽略可用容量,增加用户已用容量
|
||||
func (user *User) IncreaseStorageWithoutCheck(size uint64) {
|
||||
if size == 0 {
|
||||
|
||||
Reference in New Issue
Block a user