mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
Optimize imports
This commit is contained in:
parent
0c65acedd3
commit
ca7f1fbbe6
@ -1,15 +1,8 @@
|
|||||||
import { Context, DELETE, GET, Path, PathParam, POST, Security, ServiceContext } from "typescript-rest";
|
import { Context, DELETE, GET, Path, PathParam, POST, Security, ServiceContext } from "typescript-rest";
|
||||||
import { ApiError } from "../ApiError";
|
import { ApiError } from "../ApiError";
|
||||||
import { LogService } from "matrix-bot-sdk";
|
import { LogService } from "matrix-bot-sdk";
|
||||||
import { BridgedChannel, SlackBridge } from "../../bridges/SlackBridge";
|
|
||||||
import { SlackChannel, SlackTeam } from "../../bridges/models/slack";
|
|
||||||
import { ROLE_USER } from "../security/MatrixSecurity";
|
import { ROLE_USER } from "../security/MatrixSecurity";
|
||||||
import {
|
import { HookshotGithubOrg, HookshotGithubRepo, HookshotGithubRoomConfig } from "../../bridges/models/hookshot";
|
||||||
HookshotConnection, HookshotGithubOrg, HookshotGithubRepo,
|
|
||||||
HookshotJiraInstance,
|
|
||||||
HookshotJiraProject,
|
|
||||||
HookshotJiraRoomConfig
|
|
||||||
} from "../../bridges/models/hookshot";
|
|
||||||
import { HookshotGithubBridge } from "../../bridges/HookshotGithubBridge";
|
import { HookshotGithubBridge } from "../../bridges/HookshotGithubBridge";
|
||||||
|
|
||||||
interface BridgeRoomRequest {
|
interface BridgeRoomRequest {
|
||||||
@ -70,7 +63,7 @@ export class DimensionHookshotGithubService {
|
|||||||
@POST
|
@POST
|
||||||
@Path("room/:roomId/connect")
|
@Path("room/:roomId/connect")
|
||||||
@Security(ROLE_USER)
|
@Security(ROLE_USER)
|
||||||
public async bridgeRoom(@PathParam("roomId") roomId: string, request: BridgeRoomRequest): Promise<HookshotJiraRoomConfig> {
|
public async bridgeRoom(@PathParam("roomId") roomId: string, request: BridgeRoomRequest): Promise<HookshotGithubRoomConfig> {
|
||||||
const userId = this.context.request.user.userId;
|
const userId = this.context.request.user.userId;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -1,16 +1,9 @@
|
|||||||
import { Context, DELETE, GET, Path, PathParam, POST, Security, ServiceContext } from "typescript-rest";
|
import { Context, DELETE, GET, Path, PathParam, POST, Security, ServiceContext } from "typescript-rest";
|
||||||
import { ApiError } from "../ApiError";
|
import { ApiError } from "../ApiError";
|
||||||
import { LogService } from "matrix-bot-sdk";
|
import { LogService } from "matrix-bot-sdk";
|
||||||
import { BridgedChannel, SlackBridge } from "../../bridges/SlackBridge";
|
|
||||||
import { SlackChannel, SlackTeam } from "../../bridges/models/slack";
|
|
||||||
import { ROLE_USER } from "../security/MatrixSecurity";
|
import { ROLE_USER } from "../security/MatrixSecurity";
|
||||||
import { HookshotJiraBridge } from "../../bridges/HookshotJiraBridge";
|
import { HookshotJiraBridge } from "../../bridges/HookshotJiraBridge";
|
||||||
import {
|
import { HookshotJiraInstance, HookshotJiraProject, HookshotJiraRoomConfig } from "../../bridges/models/hookshot";
|
||||||
HookshotConnection,
|
|
||||||
HookshotJiraInstance,
|
|
||||||
HookshotJiraProject,
|
|
||||||
HookshotJiraRoomConfig
|
|
||||||
} from "../../bridges/models/hookshot";
|
|
||||||
|
|
||||||
interface BridgeRoomRequest {
|
interface BridgeRoomRequest {
|
||||||
instanceName: string;
|
instanceName: string;
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
import HookshotGithubBridgeRecord from "../db/models/HookshotGithubBridgeRecord";
|
import HookshotGithubBridgeRecord from "../db/models/HookshotGithubBridgeRecord";
|
||||||
import {
|
import { HookshotGithubRepo, HookshotGithubRoomConfig, HookshotGithubUserInfo, HookshotTypes } from "./models/hookshot";
|
||||||
HookshotConnection, HookshotGithubRepo,
|
|
||||||
HookshotGithubRoomConfig,
|
|
||||||
HookshotGithubUserInfo,
|
|
||||||
HookshotJiraUserInfo,
|
|
||||||
HookshotTypes
|
|
||||||
} from "./models/hookshot";
|
|
||||||
import { HookshotBridge } from "./HookshotBridge";
|
import { HookshotBridge } from "./HookshotBridge";
|
||||||
|
|
||||||
export class HookshotGithubBridge extends HookshotBridge {
|
export class HookshotGithubBridge extends HookshotBridge {
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
import HookshotJiraBridgeRecord from "../db/models/HookshotJiraBridgeRecord";
|
import HookshotJiraBridgeRecord from "../db/models/HookshotJiraBridgeRecord";
|
||||||
import {
|
import { HookshotJiraProject, HookshotJiraRoomConfig, HookshotJiraUserInfo, HookshotTypes } from "./models/hookshot";
|
||||||
HookshotConnection,
|
|
||||||
HookshotGithubRoomConfig, HookshotJiraProject,
|
|
||||||
HookshotJiraRoomConfig,
|
|
||||||
HookshotJiraUserInfo,
|
|
||||||
HookshotTypes
|
|
||||||
} from "./models/hookshot";
|
|
||||||
import { HookshotBridge } from "./HookshotBridge";
|
import { HookshotBridge } from "./HookshotBridge";
|
||||||
|
|
||||||
export class HookshotJiraBridge extends HookshotBridge {
|
export class HookshotJiraBridge extends HookshotBridge {
|
||||||
|
Loading…
Reference in New Issue
Block a user