mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-05-31 17:46:17 +00:00
Created component to edit short URLs meta
This commit is contained in:
@@ -23,7 +23,7 @@ export default class ShlinkApiClient {
|
||||
|
||||
listShortUrls = pipe(
|
||||
(options = {}) => reject(isNil, options),
|
||||
(options = {}) => this._performRequest('/short-urls', 'GET', options).then((resp) => resp.data.shortUrls)
|
||||
(options) => this._performRequest('/short-urls', 'GET', options).then((resp) => resp.data.shortUrls)
|
||||
);
|
||||
|
||||
createShortUrl = (options) => {
|
||||
@@ -49,6 +49,10 @@ export default class ShlinkApiClient {
|
||||
this._performRequest(`/short-urls/${shortCode}/tags`, 'PUT', {}, { tags })
|
||||
.then((resp) => resp.data.tags);
|
||||
|
||||
updateShortUrlMeta = (shortCode, meta) =>
|
||||
this._performRequest(`/short-urls/${shortCode}`, 'PATCH', {}, meta)
|
||||
.then(() => ({ meta }));
|
||||
|
||||
listTags = () =>
|
||||
this._performRequest('/tags', 'GET')
|
||||
.then((resp) => resp.data.tags.data);
|
||||
|
||||
Reference in New Issue
Block a user