소스 검색

implement aurhTestByToken

itizawa 5 년 전
부모
커밋
09558c0815
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      packages/slack/src/utils/check-communicable.ts

+ 9 - 0
packages/slack/src/utils/check-communicable.ts

@@ -89,3 +89,12 @@ export const getConnectionStatuses = async(tokens: string[]): Promise<{[key: str
   // convert to object
   return Object.fromEntries(await map);
 };
+
+/**
+ * @param token bot OAuth token
+ * @returns
+ */
+export const aurhTestByToken = async(token:string): Promise<void> => {
+  const client = generateWebClient(token);
+  await testSlackApiServer(client);
+};