type Jira = {
username: string;
password: string;
domain: string;
};
/**
* Delete UI modification
* Deletes a UI modification. All the contexts that belong to the UI modification are deleted too. UI modification can only be deleted by Forge apps.
**[Permissions](#permissions) required:** None.
*/
export async function main(auth: Jira, uiModificationId: string) {
const url = new URL(
`https://${auth.domain}.atlassian.net/rest/api/2/uiModifications/${uiModificationId}`
);
const response = await fetch(url, {
method: "DELETE",
headers: {
Authorization: "Basic " + btoa(`${auth.username}:${auth.password}`),
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 396 days ago
type Jira = {
username: string;
password: string;
domain: string;
};
/**
* Delete UI modification
* Deletes a UI modification. All the contexts that belong to the UI modification are deleted too. UI modification can only be deleted by Forge apps.
**[Permissions](#permissions) required:** None.
*/
export async function main(auth: Jira, uiModificationId: string) {
const url = new URL(
`https://${auth.domain}.atlassian.net/rest/api/2/uiModifications/${uiModificationId}`
);
const response = await fetch(url, {
method: "DELETE",
headers: {
Authorization: "Basic " + btoa(`${auth.username}:${auth.password}`),
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 948 days ago