mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-01 05:06:39 +00:00
Updated short URL tags adding real behavior
This commit is contained in:
@@ -44,6 +44,11 @@ export class ShlinkApiClient {
|
||||
.then(resp => resp.data)
|
||||
.catch(e => this._handleAuthError(e, this.getShortUrl, [shortCode]));
|
||||
|
||||
updateShortUrlTags = (shortCode, tags) =>
|
||||
this._performRequest(`/short-codes/${shortCode}/tags`, 'PUT', {}, { tags })
|
||||
.then(resp => resp.data.tags)
|
||||
.catch(e => this._handleAuthError(e, this.updateShortUrlTags, [shortCode, tags]));
|
||||
|
||||
_performRequest = async (url, method = 'GET', params = {}, data = {}) => {
|
||||
if (isEmpty(this._token)) {
|
||||
this._token = await this._authenticate();
|
||||
|
||||
Reference in New Issue
Block a user