add repositories and fixed services

This commit is contained in:
Fran Jurmanović
2022-10-07 23:48:35 +02:00
parent 82e97fc97f
commit ec863d55b3
36 changed files with 703 additions and 497 deletions

View File

@@ -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
}