updates
This commit is contained in:
parent
af6ebfe15c
commit
5f9f1ceeba
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "datasquirel",
|
||||
"version": "1.4.4",
|
||||
"version": "1.4.5",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -18,6 +18,7 @@ const https = require("https");
|
||||
* @property {{
|
||||
* urlPath: string,
|
||||
* }} payload - Payload containing the url for the image and its thumbnail
|
||||
* @property {string} [msg] - An optional message
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -39,6 +40,7 @@ const https = require("https");
|
||||
* @returns { Promise<FunctionReturn> } - Return Object
|
||||
*/
|
||||
async function uploadImage({ key, payload }) {
|
||||
try {
|
||||
/**
|
||||
* Make https request
|
||||
*
|
||||
@ -91,6 +93,19 @@ async function uploadImage({ key, payload }) {
|
||||
/** ********************************************** */
|
||||
|
||||
return httpResponse;
|
||||
} catch (error) {
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
|
||||
console.log("Error in uploading file: ", error.message);
|
||||
|
||||
return {
|
||||
success: false,
|
||||
payload: null,
|
||||
msg: error.message,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/** ********************************************** */
|
||||
|
@ -19,6 +19,7 @@ const https = require("https");
|
||||
* urlPath: string,
|
||||
* urlThumbnailPath: string
|
||||
* }} payload - Payload containing the url for the image and its thumbnail
|
||||
* @property {string} [msg] - An optional message
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -41,6 +42,7 @@ const https = require("https");
|
||||
* @returns { Promise<FunctionReturn> } - Return Object
|
||||
*/
|
||||
async function uploadImage({ key, payload }) {
|
||||
try {
|
||||
/**
|
||||
* Make https request
|
||||
*
|
||||
@ -93,6 +95,19 @@ async function uploadImage({ key, payload }) {
|
||||
/** ********************************************** */
|
||||
|
||||
return httpResponse;
|
||||
} catch (error) {
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
/** ********************************************** */
|
||||
|
||||
console.log("Error in uploading image: ", error.message);
|
||||
|
||||
return {
|
||||
success: false,
|
||||
payload: null,
|
||||
msg: error.message,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/** ********************************************** */
|
||||
|
Loading…
Reference in New Issue
Block a user