Skip to content

Commit

Permalink
fix: fix deploy apis' result data;
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Jul 31, 2021
1 parent 8bcc6e4 commit e9c0aac
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/devops-server/src/router/publish/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ PublishRouter.post('/policy', async (req, res) => {
}

try {
const r = await publishAccessPolicy()
await publishAccessPolicy()

return res.send({
code: 0,
data: r
data: 'ok'
})
} catch (error) {
return res.send({
Expand All @@ -35,7 +35,7 @@ PublishRouter.post('/policy', async (req, res) => {
/**
* 发布云函数
*/
PublishRouter.post('/functions', async (req, res) => {
PublishRouter.post('/functions', async (req, res) => {

// 权限验证
const code = await checkPermission(req['auth']?.uid, 'publish.function')
Expand All @@ -44,11 +44,11 @@ PublishRouter.post('/policy', async (req, res) => {
}

try {
const r = await publishFunctions()
await publishFunctions()

return res.send({
code: 0,
data: r
data: 'ok'
})
} catch (error) {
return res.send({
Expand All @@ -62,7 +62,7 @@ PublishRouter.post('/policy', async (req, res) => {
/**
* 发布触发器
*/
PublishRouter.post('/triggers', async (req, res) => {
PublishRouter.post('/triggers', async (req, res) => {

// 权限验证
const code = await checkPermission(req['auth']?.uid, 'publish.trigger')
Expand All @@ -71,11 +71,11 @@ PublishRouter.post('/policy', async (req, res) => {
}

try {
const r = await publishTriggers()
await publishTriggers()

return res.send({
code: 0,
data: r
data: 'ok'
})
} catch (error) {
return res.send({
Expand Down

0 comments on commit e9c0aac

Please sign in to comment.