mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2025-12-01 17:43:16 +00:00
up gorm logger & add share to guest by web client
This commit is contained in:
@@ -9,6 +9,7 @@ type WebClientPeerPayload struct {
|
||||
ViewStyle string `json:"view-style"`
|
||||
Tm int64 `json:"tm"`
|
||||
Info WebClientPeerInfoPayload `json:"info"`
|
||||
Tmppwd string `json:"tmppwd"`
|
||||
}
|
||||
|
||||
type WebClientPeerInfoPayload struct {
|
||||
@@ -16,6 +17,7 @@ type WebClientPeerInfoPayload struct {
|
||||
Hostname string `json:"hostname"`
|
||||
Platform string `json:"platform"`
|
||||
Hash string `json:"hash"`
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
func (wcpp *WebClientPeerPayload) FromAddressBook(a *model.AddressBook) {
|
||||
@@ -29,3 +31,16 @@ func (wcpp *WebClientPeerPayload) FromAddressBook(a *model.AddressBook) {
|
||||
Hash: a.Hash,
|
||||
}
|
||||
}
|
||||
|
||||
func (wcpp *WebClientPeerPayload) FromShareRecord(sr *model.ShareRecord) {
|
||||
wcpp.ViewStyle = "shrink"
|
||||
//24小时前
|
||||
wcpp.Tm = time.Now().UnixNano()
|
||||
wcpp.Tmppwd = sr.Password
|
||||
wcpp.Info = WebClientPeerInfoPayload{
|
||||
Username: "",
|
||||
Hostname: "",
|
||||
Platform: "",
|
||||
Id: sr.PeerId,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user