mirror of
https://github.com/1f349/admin.1f349.com.git
synced 2025-02-22 13:34:57 +00:00
Support making real api updates
This commit is contained in:
parent
6aa8c8612d
commit
3fd2fa7ac5
@ -51,9 +51,11 @@
|
|||||||
})
|
})
|
||||||
.then(x => {
|
.then(x => {
|
||||||
let routes = x as Route[];
|
let routes = x as Route[];
|
||||||
|
let y: {[key: string]: CSPair<Route>} = {};
|
||||||
routes.forEach(x => {
|
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();
|
res();
|
||||||
})
|
})
|
||||||
.catch(x => rej(x));
|
.catch(x => rej(x));
|
||||||
@ -69,9 +71,11 @@
|
|||||||
})
|
})
|
||||||
.then(x => {
|
.then(x => {
|
||||||
let redirects = x as Redirect[];
|
let redirects = x as Redirect[];
|
||||||
|
let y: {[key: string]: CSPair<Redirect>} = {};
|
||||||
redirects.forEach(x => {
|
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();
|
res();
|
||||||
})
|
})
|
||||||
.catch(x => rej(x));
|
.catch(x => rej(x));
|
||||||
@ -133,7 +137,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div style="padding:8px;background-color:#bb7900;">
|
<div style="padding:8px;background-color:#bb7900;">
|
||||||
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
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button on:click={() => saveChanges()}>Save Changes</button>
|
<button on:click={() => saveChanges()}>Save Changes</button>
|
||||||
|
@ -4,12 +4,15 @@ go 1.21.3
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/MrMelon54/mjwt v0.1.1
|
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/google/uuid v1.3.1
|
||||||
github.com/rs/cors v1.10.1
|
github.com/rs/cors v1.10.1
|
||||||
)
|
)
|
||||||
|
|
||||||
|
require github.com/becheran/wildmatch-go v1.0.0 // indirect
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/1f349/mjwt v0.2.0
|
||||||
github.com/pkg/errors v0.9.1 // indirect
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
@ -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 h1:m+aTpxbhQCrOPKHN170DQMFR5r938LkviU38unob5Jw=
|
||||||
github.com/MrMelon54/mjwt v0.1.1/go.mod h1:oYrDBWK09Hju98xb+bRQ0wy+RuAzacxYvKYOZchR2Tk=
|
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 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
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 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.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 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
|
||||||
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||||
|
@ -9,9 +9,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/MrMelon54/mjwt"
|
"github.com/1f349/mjwt"
|
||||||
"github.com/MrMelon54/mjwt/auth"
|
"github.com/1f349/mjwt/auth"
|
||||||
"github.com/MrMelon54/mjwt/claims"
|
"github.com/1f349/mjwt/claims"
|
||||||
"github.com/golang-jwt/jwt/v4"
|
"github.com/golang-jwt/jwt/v4"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/rs/cors"
|
"github.com/rs/cors"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user