修复远程仓库信息获取问题。

This commit is contained in:
Ivan Li
2021-02-23 20:19:39 +08:00
parent dfaee1fb56
commit ab6c56e55a
9 changed files with 62 additions and 17 deletions

View File

@ -1,21 +1,21 @@
import { Args, Query, Resolver } from '@nestjs/graphql';
import { ListLogsArgs } from './dtos/list-logs.args';
import { ReposService } from './repos.service';
import { LogsList } from './dtos/logs-list.model';
import { LogList } from './dtos/log-list.model';
import { ListBranchesArgs } from './dtos/list-branches.args';
import { BranchesList } from './dtos/branches-list.model';
import { BranchList } from './dtos/branch-list.model';
@Resolver()
export class ReposResolver {
con
@Query(() => LogsList)
constructor(private readonly service: ReposService) {}
@Query(() => LogList)
async listLogs(@Args('listLogsArgs') dto: ListLogsArgs) {
return await this.service.listLogs(dto);
}
@Query(() => BranchesList)
@Query(() => BranchList)
async ListBranchesArgs(
@Args('listBranchesArgs') dto: ListBranchesArgs,
): Promise<BranchesList> {
): Promise<BranchList> {
return await this.service.listBranches(dto).then((data) => {
return {
...data,