Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wrr-cat
apollo
提交
4f37245c
apollo
项目概览
wrr-cat
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4f37245c
编写于
8月 11, 2016
作者:
J
Jason Song
提交者:
GitHub
8月 11, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #377 from lepdou/open
delete item api move operator field to request body
上级
261b382c
5af5ece9
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
7 addition
and
7 deletion
+7
-7
apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/ItemController.java
...ramework/apollo/openapi/v1/controller/ItemController.java
+6
-6
apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/ReleaseController.java
...ework/apollo/openapi/v1/controller/ReleaseController.java
+1
-1
未找到文件。
apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/ItemController.java
浏览文件 @
4f37245c
...
...
@@ -68,17 +68,17 @@ public class ItemController {
RequestPrecondition
.
checkArguments
(
!
StringUtils
.
isContainEmpty
(
item
.
getKey
(),
item
.
getValue
(),
item
.
getDataChangeLastModifiedBy
()),
"key,value,dataChangeLastModifiedBy
字段不能为空
"
);
"key,value,dataChangeLastModifiedBy
can not be empty
"
);
RequestPrecondition
.
checkArguments
(
item
.
getKey
().
equals
(
key
),
"
path中的key和payload中的key不一致
"
);
RequestPrecondition
.
checkArguments
(
item
.
getKey
().
equals
(
key
),
"
Key in path and payload is not consistent
"
);
if
(
userService
.
findByUserId
(
item
.
getDataChangeLastModifiedBy
())
==
null
)
{
throw
new
BadRequestException
(
"
用户不存在
"
);
throw
new
BadRequestException
(
"
user(dataChangeLastModifiedBy) not exists
"
);
}
ItemDTO
toUpdateItem
=
itemService
.
loadItem
(
Env
.
fromString
(
env
),
appId
,
clusterName
,
namespaceName
,
item
.
getKey
());
if
(
toUpdateItem
==
null
)
{
throw
new
BadRequestException
(
"item
不存在
"
);
throw
new
BadRequestException
(
"item
not exists
"
);
}
//protect. only value,comment,lastModifiedBy can be modified
toUpdateItem
.
setComment
(
item
.
getComment
());
...
...
@@ -97,12 +97,12 @@ public class ItemController {
HttpServletRequest
request
)
{
if
(
userService
.
findByUserId
(
operator
)
==
null
)
{
throw
new
BadRequestException
(
"
用户不存在
"
);
throw
new
BadRequestException
(
"
user(operator) not exists
"
);
}
ItemDTO
toDeleteItem
=
itemService
.
loadItem
(
Env
.
valueOf
(
env
),
appId
,
clusterName
,
namespaceName
,
key
);
if
(
toDeleteItem
==
null
){
throw
new
BadRequestException
(
"item
不存在
"
);
throw
new
BadRequestException
(
"item
not exists
"
);
}
itemService
.
deleteItem
(
Env
.
fromString
(
env
),
toDeleteItem
.
getId
(),
operator
);
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/openapi/v1/controller/ReleaseController.java
浏览文件 @
4f37245c
...
...
@@ -47,7 +47,7 @@ public class ReleaseController {
"releaseTitle and releaseBy can not be empty"
);
if
(
userService
.
findByUserId
(
model
.
getReleasedBy
())
==
null
)
{
throw
new
BadRequestException
(
"
用户不存在.
"
);
throw
new
BadRequestException
(
"
user(releaseBy) not exists
"
);
}
model
.
setAppId
(
appId
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录