Refine the directory structure of this project.
This commit is contained in:
@ -2,6 +2,7 @@ package rest
|
||||
|
||||
import (
|
||||
"github.com/nu7hatch/gouuid"
|
||||
"tank/rest/result"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -17,7 +18,7 @@ func (this *PreferenceDao) Fetch() *Preference {
|
||||
db := CONTEXT.DB.First(preference)
|
||||
if db.Error != nil {
|
||||
|
||||
if db.Error.Error() == DB_ERROR_NOT_FOUND {
|
||||
if db.Error.Error() == result.DB_ERROR_NOT_FOUND {
|
||||
preference.Name = "蓝眼云盘"
|
||||
preference.ShowAlien = true
|
||||
this.Create(preference)
|
||||
|
Reference in New Issue
Block a user