Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit post: Unable to specifically remove "Add caption" field for image #734

Merged
merged 5 commits into from
Jan 10, 2024

Conversation

ushahidlee
Copy link
Contributor

Fixes USH-777

Copy link

linear bot commented Jan 3, 2024

@ushahidlee ushahidlee marked this pull request as ready for review January 8, 2024 11:28
Copy link
Contributor

@Angamanga Angamanga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I test this out locally, the API complains about "The PATCH method is not supported for this route. Supported methods: GET, HEAD, PUT, DELETE." when trying to save a new caption/remove a caption. Does it work for you locally @ushahidlee?

@@ -2,13 +2,13 @@ import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { apiHelpers } from '../helpers';
import { EnvLoader } from '../loader';
import { MediaResponse } from '../models';
// import { MediaResponse } from '../models';
import { ResourceService } from './resource.service';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should MediaResponse be removed?

updatedPost.post_content = p.post_content;
this.posts = this.posts.map((obj) => (obj.id === updatedPost.id ? updatedPost : obj));
}
const updatedPost = _.cloneDeep(p);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very neat 🙌

@ushahidlee
Copy link
Contributor Author

@Angamanga Yes this ticket can only be tested with a corresponding PR on platform

ushahidi/platform#4686

@Angamanga
Copy link
Contributor

@ushahidlee Aahh, got it. Good time for me to set the API up then 🤓

@ushahidlee ushahidlee merged commit 1f13319 into development Jan 10, 2024
9 of 12 checks passed
tuxpiper pushed a commit that referenced this pull request Jan 15, 2024
#734)

* Uses the caption field for updates and a media patch rest

* fixed bug, still needs to propagate change

* Fixed reactivity issue in feed.

* removed un-necessary objecty things

* Slight modification to match CQRS changes in backend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants