mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-20 06:35:54 +02:00
feat: add user from, show deparments, users in pages
This commit is contained in:
+2
-1
@@ -1,4 +1,4 @@
|
||||
export default async function getUserByOrgId(req) {
|
||||
export default async function getUserByOrg(req) {
|
||||
const OrganizationId = req.params.organizationId;
|
||||
const orgPtr = {
|
||||
__type: 'Pointer',
|
||||
@@ -10,6 +10,7 @@ export default async function getUserByOrgId(req) {
|
||||
} else {
|
||||
try {
|
||||
const extUser = new Parse.Query('contracts_Users');
|
||||
extUser.include('DepartmentIds');
|
||||
extUser.equalTo('OrganizationId', orgPtr);
|
||||
const userRes = await extUser.first({ useMasterKey: true });
|
||||
if (userRes.length > 0) {
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
export default async function getUserList(req) {
|
||||
export default async function getUserListByOrg(req) {
|
||||
const OrganizationId = req.params.organizationId;
|
||||
const orgPtr = {
|
||||
__type: 'Pointer',
|
||||
@@ -11,6 +11,7 @@ export default async function getUserList(req) {
|
||||
try {
|
||||
const extUser = new Parse.Query('contracts_Users');
|
||||
extUser.equalTo('OrganizationId', orgPtr);
|
||||
extUser.include('DepartmentIds');
|
||||
const userRes = await extUser.find({ useMasterKey: true });
|
||||
if (userRes.length > 0) {
|
||||
const _userRes = JSON.parse(JSON.stringify(userRes));
|
||||
Reference in New Issue
Block a user