From f4fd06aa5bc7a92ab93f8f483af647ebe62025c3 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 11 Jun 2019 18:41:01 -0700 Subject: [PATCH] Fixing GetSite - Fixes #171 --- docs/goals.md | 4 +++- server/src/api/site.rs | 3 +-- ui/package.json | 3 ++- ui/src/services/WebSocketService.ts | 2 +- ui/yarn.lock | 12 ++++++++++++ 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/docs/goals.md b/docs/goals.md index 0d92ab657..7ec3c4905 100644 --- a/docs/goals.md +++ b/docs/goals.md @@ -23,7 +23,7 @@ - [Activitypub main](https://www.w3.org/TR/activitypub/) - [Diesel to Postgres data types](https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html) - [helpful diesel examples](http://siciarz.net/24-days-rust-diesel/) -- [Mastodan public key server example](https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/) +- [Mastodon public key server example](https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/) - [Recursive query for adjacency list for nested comments](https://stackoverflow.com/questions/192220/what-is-the-most-efficient-elegant-way-to-parse-a-flat-table-into-a-tree/192462#192462) - https://github.com/sparksuite/simplemde-markdown-editor - [Markdown-it](https://github.com/markdown-it/markdown-it) @@ -36,8 +36,10 @@ - [RES expando - Possibly make this into a switching react component.](https://github.com/honestbleeps/Reddit-Enhancement-Suite/tree/d21f55c21e734f47d8ed03fe0ebce5b16653b0bd/lib/modules/hosts) - [Temp Icon](https://www.flaticon.com/free-icon/mouse_194242) - [Rust docker build](https://shaneutt.com/blog/rust-fast-small-docker-image-builds/) +- [Zurb mentions](https://github.com/zurb/tribute) - Activitypub guides - https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/ - https://raw.githubusercontent.com/w3c/activitypub/gh-pages/activitypub-tutorial.txt - https://github.com/tOkeshu/activitypub-example + - https://blog.joinmastodon.org/2018/07/how-to-make-friends-and-verify-requests/ diff --git a/server/src/api/site.rs b/server/src/api/site.rs index 03ee90ff1..315411689 100644 --- a/server/src/api/site.rs +++ b/server/src/api/site.rs @@ -64,8 +64,7 @@ pub struct EditSite { } #[derive(Serialize, Deserialize)] -pub struct GetSite { -} +pub struct GetSite; #[derive(Serialize, Deserialize)] pub struct SiteResponse { diff --git a/ui/package.json b/ui/package.json index 6bf415558..20ecdd82a 100644 --- a/ui/package.json +++ b/ui/package.json @@ -31,7 +31,8 @@ "markdown-it-container": "^2.0.0", "moment": "^2.24.0", "rxjs": "^6.4.0", - "terser": "^3.17.0" + "terser": "^3.17.0", + "ws": "^7.0.0" }, "devDependencies": { "fuse-box": "^3.1.3", diff --git a/ui/src/services/WebSocketService.ts b/ui/src/services/WebSocketService.ts index 2fa8a4855..4cb3a262d 100644 --- a/ui/src/services/WebSocketService.ts +++ b/ui/src/services/WebSocketService.ts @@ -170,7 +170,7 @@ export class WebSocketService { } public getSite() { - this.subject.next(this.wsSendWrapper(UserOperation.GetSite, {})); + this.subject.next(this.wsSendWrapper(UserOperation.GetSite, undefined); } public search(form: SearchForm) { diff --git a/ui/yarn.lock b/ui/yarn.lock index 074c106da..8b8b8361c 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -224,6 +224,11 @@ async-each@^1.0.0: resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== +async-limiter@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" + integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -2855,6 +2860,13 @@ ws@^1.1.1: options ">=0.0.5" ultron "1.0.x" +ws@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.0.0.tgz#79351cbc3f784b3c20d0821baf4b4ff809ffbf51" + integrity sha512-cknCal4k0EAOrh1SHHPPWWh4qm93g1IuGGGwBjWkXmCG7LsDtL8w9w+YVfaF+KSVwiHQKDIMsSLBVftKf9d1pg== + dependencies: + async-limiter "^1.0.0" + yallist@^3.0.0, yallist@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9"