@magda/scripts 5.0.0-alpha.1 → 5.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,11 +31,6 @@ program
31
31
  [ADMIN_ROLE_ID, userId]
32
32
  );
33
33
  }
34
-
35
- await pool.query(
36
- `UPDATE "users" SET "isAdmin" = $1 WHERE "id" = $2`,
37
- [true, userId]
38
- );
39
34
  console.log(chalk.green("Operation Completed!"));
40
35
  } catch (e) {
41
36
  console.error(chalk.red(`Error: ${e}`));
@@ -31,11 +31,6 @@ program
31
31
  [ADMIN_ROLE_ID, userId]
32
32
  );
33
33
  }
34
-
35
- await pool.query(
36
- `UPDATE "users" SET "isAdmin"=$1 WHERE "id" = $2`,
37
- [false, userId]
38
- );
39
34
  console.log(chalk.green("Operation Completed!"));
40
35
  } catch (e) {
41
36
  console.error(chalk.red(`Error: ${e}`));
package/create-api-key.js CHANGED
@@ -137,7 +137,7 @@ function printResult(result) {
137
137
  } else {
138
138
  // --- list all users
139
139
  const users = await dbClient.query(
140
- 'SELECT "id", "displayName", "email", "source", "sourceId", "isAdmin" FROM "users"'
140
+ 'SELECT "id", "displayName", "email", "source", "sourceId" FROM "users"'
141
141
  );
142
142
  if (!users || !users.rows || !users.rows.length) {
143
143
  console.log(chalk.yellow("No user found!"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magda/scripts",
3
- "version": "5.0.0-alpha.1",
3
+ "version": "5.0.0-alpha.2",
4
4
  "description": "Scripts for building, running, and deploying MAGDA",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@magda/esm-utils": "^1.0.1",
45
- "@magda/typescript-common": "^5.0.0-alpha.1",
45
+ "@magda/typescript-common": "^5.0.0-alpha.2",
46
46
  "ansi-styles": "^3.2.1",
47
47
  "apidoc": "https://github.com/magda-io/apidoc",
48
48
  "chalk": "^2.4.1",