Merge pull request #507 from christianbundy/upgrade-koa-router

Upgrade @koa/router
This commit is contained in:
Christian Bundy 2020-11-24 21:35:22 -08:00 committed by GitHub
commit e5db883a4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 725 additions and 705 deletions

1398
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@
},
"dependencies": {
"@fraction/base16-css": "^1.1.0",
"@koa/router": "^8.0.0",
"@koa/router": "^10.0.0",
"debug": "^4.1.1",
"env-paths": "^2.2.0",
"file-type": "^16.0.1",
@ -48,32 +48,32 @@
"sharp": "^0.26.3",
"ssb-about": "^2.0.1",
"ssb-backlinks": "^2.1.1",
"ssb-blobs": "^1.2.2",
"ssb-blobs": "^1.2.3",
"ssb-client": "^4.9.0",
"ssb-config": "^3.4.4",
"ssb-conn": "^0.19.1",
"ssb-db": "^20.3.0",
"ssb-ebt": "^5.6.7",
"ssb-friends": "^4.1.4",
"ssb-invite": "^2.1.3",
"ssb-friends": "^4.3.0",
"ssb-invite": "^2.1.6",
"ssb-keys": "^8.0.0",
"ssb-lan": "^0.2.0",
"ssb-logging": "^1.0.0",
"ssb-markdown": "^6.0.7",
"ssb-master": "^1.0.3",
"ssb-meme": "^1.0.4",
"ssb-meme": "^1.1.0",
"ssb-mentions": "^0.5.2",
"ssb-msgs": "^5.2.0",
"ssb-no-auth": "^1.0.0",
"ssb-onion": "^1.0.0",
"ssb-ooo": "^1.3.1",
"ssb-ooo": "^1.3.3",
"ssb-plugins": "^1.0.2",
"ssb-private1": "^1.0.1",
"ssb-query": "^2.4.3",
"ssb-query": "^2.4.5",
"ssb-ref": "^2.13.9",
"ssb-replicate": "^1.3.0",
"ssb-room": "^1.2.2",
"ssb-search": "^1.2.1",
"ssb-room": "^1.3.0",
"ssb-search": "^1.3.0",
"ssb-tangle": "^1.0.1",
"ssb-thread-schema": "^1.1.1",
"ssb-unix-socket": "^1.0.0",

View File

@ -490,7 +490,7 @@ router
};
ctx.body = await author(feed);
})
.get("/search/", async (ctx) => {
.get("/search", async (ctx) => {
let { query } = ctx.query;
if (isMsg(query)) {
@ -545,7 +545,7 @@ router
ctx.type = "text/css";
ctx.body = requireStyle(filePath);
})
.get("/profile/", async (ctx) => {
.get("/profile", async (ctx) => {
const myFeedId = await meta.myFeedId();
const gt = Number(ctx.request.query["gt"] || -1);
@ -597,7 +597,7 @@ router
});
ctx.redirect("/profile");
})
.get("/publish/custom/", async (ctx) => {
.get("/publish/custom", async (ctx) => {
ctx.body = await publishCustomView();
})
.get("/json/:message", async (ctx) => {
@ -707,7 +707,7 @@ router
};
ctx.body = await image({ blobId, imageSize: Number(imageSize) });
})
.get("/settings/", async (ctx) => {
.get("/settings", async (ctx) => {
const theme = ctx.cookies.get("theme") || config.theme;
const getMeta = async ({ theme }) => {
const status = await meta.status();
@ -742,13 +742,13 @@ router
};
ctx.body = await likes({ feed });
})
.get("/settings/readme/", async (ctx) => {
.get("/settings/readme", async (ctx) => {
const status = async (text) => {
return markdownView({ text });
};
ctx.body = await status(readme);
})
.get("/mentions/", async (ctx) => {
.get("/mentions", async (ctx) => {
const mentions = async () => {
const messages = await post.mentionsMe();
@ -886,7 +886,7 @@ router
const previewData = await preparePreview(ctx);
ctx.body = await previewView({ previewData, contentWarning });
})
.post("/publish/", koaBody(), async (ctx) => {
.post("/publish", koaBody(), async (ctx) => {
const text = String(ctx.request.body.text);
const rawContentWarning = String(ctx.request.body.contentWarning);