mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-03 06:11:48 +00:00
Implemented edition of tags
This commit is contained in:
@@ -59,6 +59,11 @@ export class ShlinkApiClient {
|
||||
.then(() => ({ tags }))
|
||||
.catch(e => this._handleAuthError(e, this.deleteTag, []));
|
||||
|
||||
editTag = (oldName, newName) =>
|
||||
this._performRequest('/tags', 'PUT', {}, { oldName, newName })
|
||||
.then(() => ({ oldName, newName }))
|
||||
.catch(e => this._handleAuthError(e, this.editTag, [oldName, newName]));
|
||||
|
||||
_performRequest = async (url, method = 'GET', query = {}, body = {}) => {
|
||||
if (isEmpty(this._token)) {
|
||||
this._token = await this._authenticate();
|
||||
|
||||
Reference in New Issue
Block a user