diff --git a/src/views/VioletView.svelte b/src/views/VioletView.svelte index 640b34e..85ba621 100644 --- a/src/views/VioletView.svelte +++ b/src/views/VioletView.svelte @@ -51,9 +51,11 @@ }) .then(x => { let routes = x as Route[]; + let y: {[key: string]: CSPair} = {}; routes.forEach(x => { - routeData[x.src] = {client: JSON.parse(JSON.stringify(x)), server: x}; + y[x.src] = {client: JSON.parse(JSON.stringify(x)), server: x}; }); + routeData = y; res(); }) .catch(x => rej(x)); @@ -69,9 +71,11 @@ }) .then(x => { let redirects = x as Redirect[]; + let y: {[key: string]: CSPair} = {}; redirects.forEach(x => { - redirectData[x.src] = {client: JSON.parse(JSON.stringify(x)), server: x}; + y[x.src] = {client: JSON.parse(JSON.stringify(x)), server: x}; }); + redirectData = y; res(); }) .catch(x => rej(x)); @@ -133,7 +137,7 @@
- Warning: This is currently still under development and does not update the routes and redirects on the server + Warning: This is currently still under development, however it DOES update the real server routes and redirects
diff --git a/test-server/go.mod b/test-server/go.mod index 234f5a6..be339c8 100644 --- a/test-server/go.mod +++ b/test-server/go.mod @@ -4,12 +4,15 @@ go 1.21.3 require ( github.com/MrMelon54/mjwt v0.1.1 - github.com/golang-jwt/jwt/v4 v4.4.3 + github.com/golang-jwt/jwt/v4 v4.5.0 github.com/google/uuid v1.3.1 github.com/rs/cors v1.10.1 ) +require github.com/becheran/wildmatch-go v1.0.0 // indirect + require ( + github.com/1f349/mjwt v0.2.0 github.com/pkg/errors v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/test-server/go.sum b/test-server/go.sum index 8acf29e..b36e133 100644 --- a/test-server/go.sum +++ b/test-server/go.sum @@ -1,9 +1,15 @@ +github.com/1f349/mjwt v0.2.0 h1:1c3+J05RRBsClGxA91SzT3I2DkwasGA4OgLcIeXWmq4= +github.com/1f349/mjwt v0.2.0/go.mod h1:KEs6jd9JjWrQW+8feP2pGAU7pdA3aYTqjkT/YQr73PU= github.com/MrMelon54/mjwt v0.1.1 h1:m+aTpxbhQCrOPKHN170DQMFR5r938LkviU38unob5Jw= github.com/MrMelon54/mjwt v0.1.1/go.mod h1:oYrDBWK09Hju98xb+bRQ0wy+RuAzacxYvKYOZchR2Tk= +github.com/becheran/wildmatch-go v1.0.0 h1:mE3dGGkTmpKtT4Z+88t8RStG40yN9T+kFEGj2PZFSzA= +github.com/becheran/wildmatch-go v1.0.0/go.mod h1:gbMvj0NtVdJ15Mg/mH9uxk2R1QCistMyU7d9KFzroX4= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/golang-jwt/jwt/v4 v4.4.3 h1:Hxl6lhQFj4AnOX6MLrsCb/+7tCj7DxP7VA+2rDIq5AU= github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= diff --git a/test-server/main.go b/test-server/main.go index 7630ede..aae41da 100644 --- a/test-server/main.go +++ b/test-server/main.go @@ -9,9 +9,9 @@ import ( "strings" "time" - "github.com/MrMelon54/mjwt" - "github.com/MrMelon54/mjwt/auth" - "github.com/MrMelon54/mjwt/claims" + "github.com/1f349/mjwt" + "github.com/1f349/mjwt/auth" + "github.com/1f349/mjwt/claims" "github.com/golang-jwt/jwt/v4" "github.com/google/uuid" "github.com/rs/cors"