Skip to content

Commit

Permalink
Merge branch 'feat-oss' of github.com:hankeke/laf into feat-oss
Browse files Browse the repository at this point in the history
  • Loading branch information
walle233 committed May 1, 2022
2 parents 6f24b70 + 5d294b6 commit 592849a
Show file tree
Hide file tree
Showing 8 changed files with 285 additions and 171 deletions.
7 changes: 2 additions & 5 deletions packages/gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
"description": "gateway service for laf.js",
"main": "index.js",
"private": true,
"scripts": {
"copy-docs": "sh copy-docs.sh",
"build": "vitepress build ../../docs && npm run copy-docs"
},
"scripts": {},
"author": "Maslow(wangfugen@126.com)"
}
}
1 change: 1 addition & 0 deletions packages/system-server/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const CN_APP_TEMPLATES = _('app_templates')
export const CN_SPECS = _('specs')
export const CN_APP_SPECS = _('app_specs')
export const CN_REPLICATE_AUTH = _('replicate_auth')
export const CN_REPLICATE_REQUESTS = _('replicate_requests')
/**
* Constants collection
*/
Expand Down
81 changes: 0 additions & 81 deletions packages/system-server/src/handler/replicate/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion packages/system-server/src/handler/replicate/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function handleCreateReplicateAuth(req: Request, res: Response) {

// check params
if (!target_appid) {
return res.status(422).send("target_appid is empty")
return res.status(422).send("invalid target_appid")
}

// check target_appid
Expand Down
21 changes: 18 additions & 3 deletions packages/system-server/src/handler/replicate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Router } from "express"
import { handleCreateReplicateAuth } from "./create"
import { handleDeleteReplicateAuth } from "./delete"
import { handleGetReplicateAuth } from "./get"
import { handleUpdateReplicas } from "./replicas"
import { handleApplyReplicateRequest, handleCreateReplicateRequest, handleDeleteReplicateRequest, handleGetReplicateRequest } from "./request"
import { handleUpdateReplicateAuth } from "./update"

export const ReplicateRouter = Router()
Expand All @@ -31,6 +31,21 @@ ReplicateRouter.post("/replicate_auth/:id", handleUpdateReplicateAuth)
ReplicateRouter.delete("/replicate_auth/:id", handleDeleteReplicateAuth)

/**
* put replicas
* replicate request page list
*/
ReplicateRouter.put("/replicas", handleUpdateReplicas)
ReplicateRouter.get("/replicate_request", handleGetReplicateRequest)

/**
* post replicate request
*/
ReplicateRouter.post("/replicate_request", handleCreateReplicateRequest)

/**
* replicate request delete
*/
ReplicateRouter.delete("/replicate_request/:id", handleDeleteReplicateRequest)

/**
* replicate request apply
*/
ReplicateRouter.put("/replicate_request/:id", handleApplyReplicateRequest)
79 changes: 0 additions & 79 deletions packages/system-server/src/handler/replicate/replicas.ts

This file was deleted.

Loading

0 comments on commit 592849a

Please sign in to comment.