use separate pd client

This commit is contained in:
2020-06-07 21:12:48 +02:00
parent 843eaf51f9
commit 1a53def1ef
32 changed files with 185 additions and 692 deletions

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"time"
"fornaxian.com/pixeldrain-web/pixelapi"
"fornaxian.com/pixeldrain-api/api/apiclient"
"github.com/Fornaxian/log"
"github.com/julienschmidt/httprouter"
)
@@ -16,7 +16,7 @@ func (wc *WebController) serveLogout(
p httprouter.Params,
) {
if key, err := wc.getAPIKey(r); err == nil {
var api = pixelapi.New(wc.apiURLInternal)
var api = apiclient.New(wc.apiURLInternal)
api.APIKey = key
if err = api.UserSessionDestroy(key); err != nil {
log.Warn("logout failed for session '%s': %s", key, err)