mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-04 04:08:02 +02:00
Move web-push-config endpoint to config.js
This commit is contained in:
parent
9e0687e142
commit
e8139ad655
7 changed files with 11 additions and 57 deletions
server
|
@ -1,7 +1,6 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
|
@ -27,14 +26,6 @@ var (
|
|||
}`
|
||||
)
|
||||
|
||||
func TestServer_WebPush_GetConfig(t *testing.T) {
|
||||
s := newTestServer(t, newTestConfigWithWebPush(t))
|
||||
|
||||
response := request(t, s, "GET", "/v1/web-push-config", "", nil)
|
||||
require.Equal(t, 200, response.Code)
|
||||
require.Equal(t, fmt.Sprintf(`{"public_key":"%s"}`, s.config.WebPushPublicKey)+"\n", response.Body.String())
|
||||
}
|
||||
|
||||
func TestServer_WebPush_TopicSubscribe(t *testing.T) {
|
||||
s := newTestServer(t, newTestConfigWithWebPush(t))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue