mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2025-07-06 21:11:41 -07:00
chore: add typecheck and linting for backend
This commit is contained in:
parent
70c580474c
commit
bdf406f99f
10 changed files with 124 additions and 11 deletions
|
@ -8,6 +8,7 @@ const api = require("../utils/controller-api");
|
|||
|
||||
// get all members
|
||||
router.get("/", auth.isAuthorized, async function (req, res) {
|
||||
// @ts-ignore
|
||||
const nwid = req.params.nwid;
|
||||
api
|
||||
.get("controller/network/" + nwid + "/member")
|
||||
|
@ -23,6 +24,7 @@ router.get("/", auth.isAuthorized, async function (req, res) {
|
|||
|
||||
// get member
|
||||
router.get("/:mid", auth.isAuthorized, async function (req, res) {
|
||||
// @ts-ignore
|
||||
const nwid = req.params.nwid;
|
||||
const mid = req.params.mid;
|
||||
const data = await member.getMembersData(nwid, [mid]);
|
||||
|
@ -35,6 +37,7 @@ router.get("/:mid", auth.isAuthorized, async function (req, res) {
|
|||
|
||||
// update member
|
||||
router.post("/:mid", auth.isAuthorized, async function (req, res) {
|
||||
// @ts-ignore
|
||||
const nwid = req.params.nwid;
|
||||
const mid = req.params.mid;
|
||||
member.updateMemberAdditionalData(nwid, mid, req.body);
|
||||
|
@ -56,6 +59,7 @@ router.post("/:mid", auth.isAuthorized, async function (req, res) {
|
|||
|
||||
// delete member
|
||||
router.delete("/:mid", auth.isAuthorized, async function (req, res) {
|
||||
// @ts-ignore
|
||||
const nwid = req.params.nwid;
|
||||
const mid = req.params.mid;
|
||||
member.deleteMemberAdditionalData(nwid, mid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue