添加测试get接口
This commit is contained in:
parent
373b4d5074
commit
cc5d939bea
|
@ -1,9 +1,13 @@
|
|||
import { Controller, Post, Body } from '@nestjs/common';
|
||||
import {Controller, Post, Body, Get} from '@nestjs/common';
|
||||
import { ClientService } from './client.service';
|
||||
|
||||
@Controller()
|
||||
export class ClientController {
|
||||
constructor(private readonly clientService: ClientService) {}
|
||||
@Get('/test')
|
||||
test() {
|
||||
return this.clientService.test();
|
||||
}
|
||||
/**
|
||||
* 获取全国平台鉴权鉴权信息
|
||||
*/
|
||||
|
|
|
@ -7,6 +7,15 @@ import { v4 } from 'uuid';
|
|||
|
||||
@Injectable()
|
||||
export class ClientService {
|
||||
/**
|
||||
* test
|
||||
* @param req
|
||||
* @param res
|
||||
*/
|
||||
async test() {
|
||||
return Base.success('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全国平台鉴权鉴权信息
|
||||
* @param req
|
||||
|
|
|
@ -36,22 +36,6 @@ export class MpService {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询应用服务用户信息权限
|
||||
* @param req
|
||||
* @param res
|
||||
* @param next
|
||||
*/
|
||||
async queryMPInfos(id) {
|
||||
let data;
|
||||
if (id) {
|
||||
data = await mpMapper.getMpInfoById(id);
|
||||
} else {
|
||||
data = await mpMapper.getMpInfo();
|
||||
}
|
||||
return Base.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用服务后台从全国/地方服务平台获取用户信息
|
||||
* @param req
|
||||
|
@ -187,26 +171,6 @@ export class MpService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询应用服务用户信息权限
|
||||
* @param id
|
||||
* @param limitFlag
|
||||
* @param ssoAppKey
|
||||
* @param ssoAppSecret
|
||||
*/
|
||||
async setMPInfo(id, limitFlag, ssoAppKey, ssoAppSecret) {
|
||||
const data = await mpMapper.setMPInfo(
|
||||
id,
|
||||
limitFlag,
|
||||
ssoAppKey,
|
||||
ssoAppSecret,
|
||||
);
|
||||
if (!data) {
|
||||
return Base.success();
|
||||
}
|
||||
return Base.success('修改成功');
|
||||
}
|
||||
|
||||
// 查询应用服务授权列表
|
||||
async getAuthMp() {
|
||||
// 获取所有已认证服务
|
||||
|
|
Loading…
Reference in New Issue
Block a user