mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-15 07:11:15 +00:00
fix multi-peer generation, fix prefix handling (#491)
This commit is contained in:
@@ -1969,7 +1969,7 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"Suffix": {
|
||||
"Prefix": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
@@ -206,7 +206,7 @@ definitions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
Suffix:
|
||||
Prefix:
|
||||
type: string
|
||||
type: object
|
||||
model.Peer:
|
||||
|
@@ -139,7 +139,8 @@ func (s *Server) setupRoutes(endpoints ...ApiEndpointSetupFunc) {
|
||||
s.versions[version].HandleFunc("GET /swagger/index.html", s.rapiDocHandler(version)) // Deprecated: old link
|
||||
s.versions[version].HandleFunc("GET /doc.html", s.rapiDocHandler(version))
|
||||
|
||||
groupSetupFn(s.versions[version])
|
||||
versionGroup := s.versions[version].Group()
|
||||
groupSetupFn(versionGroup)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -172,13 +172,13 @@ func NewDomainPeer(src *Peer) *domain.Peer {
|
||||
|
||||
type MultiPeerRequest struct {
|
||||
Identifiers []string `json:"Identifiers"`
|
||||
Suffix string `json:"Suffix"`
|
||||
Prefix string `json:"Prefix"`
|
||||
}
|
||||
|
||||
func NewDomainPeerCreationRequest(src *MultiPeerRequest) *domain.PeerCreationRequest {
|
||||
return &domain.PeerCreationRequest{
|
||||
UserIdentifiers: src.Identifiers,
|
||||
Suffix: src.Suffix,
|
||||
Prefix: src.Prefix,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user