From 051c8816e950ed5272983fe764752ba6eaf079a2 Mon Sep 17 00:00:00 2001 From: Benjamin Toby Date: Wed, 11 Dec 2024 05:50:22 +0100 Subject: [PATCH] Updates --- package-shared/data/presets/users.json | 6 ++---- package-shared/functions/api/users/api-create-user.js | 8 ++++++-- package.json | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/package-shared/data/presets/users.json b/package-shared/data/presets/users.json index 3da8faf..1a8ef2e 100755 --- a/package-shared/data/presets/users.json +++ b/package-shared/data/presets/users.json @@ -37,13 +37,11 @@ }, { "fieldName": "image", - "dataType": "VARCHAR(250)", - "defaultValue": "/images/user-preset.png" + "dataType": "VARCHAR(250)" }, { "fieldName": "image_thumbnail", - "dataType": "VARCHAR(250)", - "defaultValue": "/images/user-preset-thumbnail.png" + "dataType": "VARCHAR(250)" }, { "fieldName": "address", diff --git a/package-shared/functions/api/users/api-create-user.js b/package-shared/functions/api/users/api-create-user.js index a22baa3..64a9458 100644 --- a/package-shared/functions/api/users/api-create-user.js +++ b/package-shared/functions/api/users/api-create-user.js @@ -128,8 +128,12 @@ module.exports = async function apiCreateUser({ tableName: "users", data: { ...payload, - image: "/images/user-preset.png", - image_thumbnail: "/images/user-preset-thumbnail.png", + image: + process.env.DSQL_DEFAULT_USER_IMAGE || + "/images/user-preset.png", + image_thumbnail: + process.env.DSQL_DEFAULT_USER_IMAGE || + "/images/user-preset-thumbnail.png", }, useLocal, }); diff --git a/package.json b/package.json index dd66bdf..ae28ea5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@moduletrace/datasquirel", - "version": "2.9.6", + "version": "2.9.7", "description": "Cloud-based SQL data management tool", "main": "index.js", "bin": {