]> Untitled Git - lemmy.git/commitdiff
Fixing create_post endpoint, changing name url param to title. Fixes #448
authorDessalines <tyhou13@gmx.com>
Mon, 20 Jan 2020 16:08:51 +0000 (11:08 -0500)
committerDessalines <tyhou13@gmx.com>
Mon, 20 Jan 2020 16:08:51 +0000 (11:08 -0500)
ui/src/components/create-post.tsx
ui/src/components/post-listing.tsx

index eeb9bc6c886819648a78c8bbbca9b9a5e9ab361a..ad013d097c982f06ca111996bd9cd223531e893f 100644 (file)
@@ -35,7 +35,7 @@ export class CreatePost extends Component<any, any> {
   get params(): PostFormParams {
     let urlParams = new URLSearchParams(this.props.location.search);
     let params: PostFormParams = {
-      name: urlParams.get('name'),
+      name: urlParams.get('title'),
       community: urlParams.get('community') || this.prevCommunityName,
       body: urlParams.get('body'),
       url: urlParams.get('url'),
index 96825753bba693a50c792449697c39f31bc0ba4a..0ffabf274832e38b6bd2d28e057f38b0b335efd4 100644 (file)
@@ -807,7 +807,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
   }
 
   get crossPostParams(): string {
-    let params = `?name=${this.props.post.name}`;
+    let params = `?title=${this.props.post.name}`;
     if (this.props.post.url) {
       params += `&url=${this.props.post.url}`;
     }