mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 06:08:16 +00:00
add repositories and fixed services
This commit is contained in:
@@ -33,3 +33,18 @@ type WalletEdit struct {
|
||||
Id string `json:"id" form:"id"`
|
||||
Name string `json:"name" form:"name"`
|
||||
}
|
||||
|
||||
func (body *NewWalletBody) ToWallet() *Wallet {
|
||||
tm := new(Wallet)
|
||||
tm.Init()
|
||||
tm.Name = body.Name
|
||||
tm.UserID = body.UserID
|
||||
return tm
|
||||
}
|
||||
|
||||
func (body *WalletEdit) ToWallet() *Wallet {
|
||||
tm := new(Wallet)
|
||||
tm.Name = body.Name
|
||||
tm.Id = body.Id
|
||||
return tm
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user