diff --git a/src/api/admin/AdminHookshotGithubService.ts b/src/api/admin/AdminHookshotGithubService.ts index 5314750..ba843ac 100644 --- a/src/api/admin/AdminHookshotGithubService.ts +++ b/src/api/admin/AdminHookshotGithubService.ts @@ -26,7 +26,7 @@ interface BridgeResponse { * Administrative API for configuring Hookshot Github bridge instances. */ @Path("/api/v1/dimension/admin/hookshot/github") -export class AdminTelegramService { +export class AdminHookshotGithubService { @Context private context: ServiceContext; @@ -51,15 +51,15 @@ export class AdminTelegramService { @Path(":bridgeId") @Security([ROLE_USER, ROLE_ADMIN]) public async getBridge(@PathParam("bridgeId") bridgeId: number): Promise { - const telegramBridge = await HookshotGithubBridgeRecord.findByPk(bridgeId); - if (!telegramBridge) throw new ApiError(404, "Github Bridge not found"); + const githubBridge = await HookshotGithubBridgeRecord.findByPk(bridgeId); + if (!githubBridge) throw new ApiError(404, "Github Bridge not found"); return { - id: telegramBridge.id, - upstreamId: telegramBridge.upstreamId, - provisionUrl: telegramBridge.provisionUrl, - sharedSecret: telegramBridge.sharedSecret, - isEnabled: telegramBridge.isEnabled, + id: githubBridge.id, + upstreamId: githubBridge.upstreamId, + provisionUrl: githubBridge.provisionUrl, + sharedSecret: githubBridge.sharedSecret, + isEnabled: githubBridge.isEnabled, }; } @@ -101,7 +101,7 @@ export class AdminTelegramService { sharedSecret: request.sharedSecret, isEnabled: true, }); - LogService.info("AdminTelegramService", userId + " created a new Hookshot Github Bridge with provisioning URL " + request.provisionUrl); + LogService.info("AdminHookshotGithubService", userId + " created a new Hookshot Github Bridge with provisioning URL " + request.provisionUrl); Cache.for(CACHE_HOOKSHOT_GITHUB_BRIDGE).clear(); Cache.for(CACHE_INTEGRATIONS).clear(); diff --git a/web/app/admin/bridges/hookshot-github/hookshot-github.component.ts b/web/app/admin/bridges/hookshot-github/hookshot-github.component.ts index edf1555..08fd528 100644 --- a/web/app/admin/bridges/hookshot-github/hookshot-github.component.ts +++ b/web/app/admin/bridges/hookshot-github/hookshot-github.component.ts @@ -4,7 +4,6 @@ import { AdminHookshotGithubBridgeManageSelfhostedComponent, ManageSelfhostedHookshotGithubBridgeDialogContext } from "./manage-selfhosted/manage-selfhosted.component"; -import { FE_TelegramBridge } from "../../../shared/models/telegram"; import { TranslateService } from "@ngx-translate/core"; import { NgbModal } from "@ng-bootstrap/ng-bootstrap"; import { AdminHookshotGithubApiService } from "../../../shared/services/admin/admin-hookshot-github-api.service"; @@ -18,7 +17,7 @@ export class AdminHookshotGithubBridgeComponent implements OnInit { public isLoading = true; public isUpdating = false; - public configurations: FE_TelegramBridge[] = []; + public configurations: FE_HookshotGithubBridge[] = []; constructor(private hookshotApi: AdminHookshotGithubApiService, private toaster: ToasterService, diff --git a/web/app/shared/services/admin/admin-hookshot-github-api.service.ts b/web/app/shared/services/admin/admin-hookshot-github-api.service.ts index bd20f85..4290023 100644 --- a/web/app/shared/services/admin/admin-hookshot-github-api.service.ts +++ b/web/app/shared/services/admin/admin-hookshot-github-api.service.ts @@ -1,7 +1,6 @@ import { Injectable } from "@angular/core"; import { AuthedApi } from "../authed-api"; import { FE_Upstream } from "../../models/admin-responses"; -import { FE_TelegramBridge, FE_TelegramBridgeOptions } from "../../models/telegram"; import { HttpClient } from "@angular/common/http"; import { FE_HookshotGithubBridge } from "../../models/hookshot_github"; @@ -31,7 +30,7 @@ export class AdminHookshotGithubApiService extends AuthedApi { } public updateSelfhosted(bridgeId: number, provisionUrl: string, sharedSecret: string): Promise { - return this.authedPost("/api/v1/dimension/admin/hookshot/github/" + bridgeId, { + return this.authedPost("/api/v1/dimension/admin/hookshot/github/" + bridgeId, { provisionUrl: provisionUrl, sharedSecret: sharedSecret, }).toPromise();