Skip to content

Commit

Permalink
update webhook token
Browse files Browse the repository at this point in the history
  • Loading branch information
pan261 committed Feb 11, 2022
1 parent ff3d98e commit 3e45d90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/forge-delete.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// NOT CURRENTLY USED, ENDPOINTS AND FUNCTIONS DO NOT WORK
////////////////////////////////

import * as ForgeSDK from "forge-apis";
import * as axios from "axios";

Expand Down
3 changes: 2 additions & 1 deletion src/forge-webhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ exports.setupToken = (credentials: ForgeSDK.AuthToken) => {
.catch((err: axios.AxiosError) => {
if (err.response) {
if (err.response.status == 400) {
console.log("Webhook token already exists");
console.log("Webhook token already exists, updating");
updateToken(credentials);
} else {
console.log("Error creating a new webhook token");
}
Expand Down

0 comments on commit 3e45d90

Please sign in to comment.