Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add nonexistent tags from /interface/(add/up/save) #1918

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

tangcent
Copy link
Contributor

@tangcent tangcent commented Sep 3, 2020

通过openapi /interface/add | /interface/up | /interface/save更新接口时,如果参数中包含目前项目未添加的tag (#1207),自动添加进项目。
减少每次创建新的项目都需要手动把tag添加一遍的操作.

@ariesly15 ariesly15 changed the base branch from master to feature-pr October 12, 2021 03:20
@ariesly15 ariesly15 merged commit 4d24c39 into YMFE:feature-pr Oct 12, 2021
//检查是否提交了目前不存在的tag
let tags = params.tag;
if (tags && Array.isArray(tags) && tags.length > 0) {
let projectData = await this.projectModel.get(params.project_id);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码有问题,params 中根本没有 project_id 这个属性。。。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为我这边全部是通过插件上传,会给出project_id,所以这个bug我一直没发现。
已经提交了修复: #2374

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx

daliandazi added a commit to daliandazi/yapi that referenced this pull request Jan 20, 2022
* master:
  chore: 更新前端静态文件,增加测试文件,增加code format 配置文件,增加自动生成changelog工具
  fix: issues 2357
  fix: [2361] 修复所有分类被删除时,同步问题. 解决方案: 增加 "默认分类"
  feat: add nonexistent tags from `/interface/(add/up/save)` (YMFE#1918)
  Update db.js (YMFE#2077)
  chore: update versions to 1.10.1
  opti: update static file
  chore: Version to 1.10.0
  chore: Version to 1.9.5
  opti: up static file
  chore: up version to 1.9.4
  Fix interfaceCol 报错'col_id不能为空' (YMFE#1839)
  fix: delete follow info while delete project (YMFE#1691)
  fix: 修复导出html接口文档时,不同目录下有相同接口名导致的接口错位问题 (YMFE#2270)

# Conflicts:
#	.prettierrc.js
#	package-lock.json
#	package.json
#	server/controllers/interface.js
#	server/utils/db.js
#	static/prd/assets.js
#	static/prd/[email protected]
#	static/prd/[email protected]
#	static/prd/[email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants