finish setup insert method, refactor sql migration file
This commit is contained in:
@@ -10,15 +10,19 @@ type Author struct {
|
||||
// SystemAuthorsFlags SystemAuthorsFlags `json:"flags"`
|
||||
}
|
||||
|
||||
func (a *Author) ToDB(dest *db.Author) bool {
|
||||
func (a *Author) ToDB(dest **db.Author) bool {
|
||||
if dest == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
dest.Name = a.Name
|
||||
dest.URL = a.URL
|
||||
dest.Email = a.Email
|
||||
dest.Discord = a.Discord
|
||||
author := &db.Author{
|
||||
Name: a.Name,
|
||||
URL: a.URL,
|
||||
Email: a.Email,
|
||||
Discord: a.Discord,
|
||||
}
|
||||
|
||||
*dest = author
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user