Make the DNS client public
This commit is contained in:
parent
63a7e0b462
commit
9272ee5a8c
|
@ -39,13 +39,14 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/julienschmidt/httprouter"
|
||||
"github.com/miekg/dns"
|
||||
|
||||
"git.happydns.org/happydns/config"
|
||||
)
|
||||
|
||||
func init() {
|
||||
router.POST("/api/resolver", apiAuthHandler(runResolver))
|
||||
router.POST("/api/resolver", ApiHandler(runResolver))
|
||||
}
|
||||
|
||||
type resolverRequest struct {
|
||||
|
@ -54,7 +55,7 @@ type resolverRequest struct {
|
|||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
func runResolver(_ *config.Options, req *RequestResources, body io.Reader) Response {
|
||||
func runResolver(_ *config.Options, ps httprouter.Params, body io.Reader) Response {
|
||||
var urr resolverRequest
|
||||
err := json.NewDecoder(body).Decode(&urr)
|
||||
if err != nil {
|
||||
|
|
|
@ -78,6 +78,10 @@
|
|||
<b-navbar-nav v-else class="ml-auto">
|
||||
<h-help class="mr-2" size="sm" variant="link" />
|
||||
|
||||
<b-button class="mr-2" variant="info" to="/tools/client">
|
||||
<b-icon icon="list" aria-hidden="true" /> {{ $t('menu.dns-client') }}
|
||||
</b-button>
|
||||
|
||||
<b-button variant="outline-dark" to="/join">
|
||||
<b-icon icon="person-plus-fill" aria-hidden="true" /> {{ $t('menu.signup') }}
|
||||
</b-button>
|
||||
|
|
Loading…
Reference in New Issue
Block a user