mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-15 20:13:48 +00:00
Ensured domain is passed when editing tags for a short URL on a specific domain
This commit is contained in:
@@ -19,7 +19,7 @@ const EditTagsModal = (TagsSelector) => class EditTagsModal extends React.Compon
|
||||
saveTags = () => {
|
||||
const { editShortUrlTags, shortUrl, toggle } = this.props;
|
||||
|
||||
editShortUrlTags(shortUrl.shortCode, this.state.tags)
|
||||
editShortUrlTags(shortUrl.shortCode, shortUrl.domain, this.state.tags)
|
||||
.then(toggle)
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@ export const editShortUrlMeta = (buildShlinkApiClient) => (shortCode, meta) => a
|
||||
const { updateShortUrlMeta } = await buildShlinkApiClient(getState);
|
||||
|
||||
try {
|
||||
await updateShortUrlMeta(shortCode, meta);
|
||||
await updateShortUrlMeta(shortCode, undefined, meta);
|
||||
dispatch({ shortCode, meta, type: SHORT_URL_META_EDITED });
|
||||
} catch (e) {
|
||||
dispatch({ type: EDIT_SHORT_URL_META_ERROR });
|
||||
|
||||
@@ -29,12 +29,12 @@ export default handleActions({
|
||||
[RESET_EDIT_SHORT_URL_TAGS]: () => initialState,
|
||||
}, initialState);
|
||||
|
||||
export const editShortUrlTags = (buildShlinkApiClient) => (shortCode, tags) => async (dispatch, getState) => {
|
||||
export const editShortUrlTags = (buildShlinkApiClient) => (shortCode, domain, tags) => async (dispatch, getState) => {
|
||||
dispatch({ type: EDIT_SHORT_URL_TAGS_START });
|
||||
const { updateShortUrlTags } = await buildShlinkApiClient(getState);
|
||||
|
||||
try {
|
||||
const normalizedTags = await updateShortUrlTags(shortCode, tags);
|
||||
const normalizedTags = await updateShortUrlTags(shortCode, domain, tags);
|
||||
|
||||
dispatch({ tags: normalizedTags, shortCode, type: SHORT_URL_TAGS_EDITED });
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user