feat: 重构各业务模块管理页面与服务
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Injectable, Logger, BadRequestException, NotFoundException } from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import { DINGTALK_OAUTH_TOKEN_URL } from '../endpoints';
|
||||
import { IntegrationConfig, IntegrationConfigDetail } from '../entities/integration-config.entity';
|
||||
import {
|
||||
ThirdConfigBaseDTO,
|
||||
@@ -208,7 +209,7 @@ export class IntegrationConfigService {
|
||||
const controller = new AbortController();
|
||||
const timeout = setTimeout(() => controller.abort(), 10_000);
|
||||
try {
|
||||
const res = await fetch('https://api.dingtalk.com/v1.0/oauth2/accessToken', {
|
||||
const res = await fetch(DINGTALK_OAUTH_TOKEN_URL, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ appKey, appSecret }),
|
||||
|
||||
Reference in New Issue
Block a user