Updates
This commit is contained in:
parent
2a4e111160
commit
6be3ede31a
@ -7,5 +7,5 @@ declare function _exports({ code, clientId, clientSecret, database, additionalFi
|
||||
res?: any;
|
||||
email?: string;
|
||||
userId?: string | number;
|
||||
}): Promise<import("../../../../types").APIGoogleLoginFunctionReturn>;
|
||||
}): Promise<import("../../../../types").APILoginFunctionReturn>;
|
||||
export = _exports;
|
||||
|
@ -16,7 +16,7 @@ const camelJoinedtoCamelSpace = require("../../../../utils/camelJoinedtoCamelSpa
|
||||
* @param {string} [param.email]
|
||||
* @param {string | number} [param.userId]
|
||||
*
|
||||
* @returns {Promise<import("../../../../types").APIGoogleLoginFunctionReturn>}
|
||||
* @returns {Promise<import("../../../../types").APILoginFunctionReturn>}
|
||||
*/
|
||||
module.exports = async function apiGithubLogin({
|
||||
code,
|
||||
|
5
package-shared/types/index.d.ts
vendored
5
package-shared/types/index.d.ts
vendored
@ -159,10 +159,7 @@ export interface GetReqQueryObject {
|
||||
queryValues?: string;
|
||||
tableName?: string;
|
||||
}
|
||||
export type SerializeQueryFnType = (param0: SerializeQueryParams) => string;
|
||||
export interface SerializeQueryParams {
|
||||
query: any;
|
||||
}
|
||||
export type SerializeQueryFnType = (query: any) => string;
|
||||
export type DATASQUIREL_LoggedInUser = {
|
||||
id: number;
|
||||
uuid?: string;
|
||||
|
@ -188,13 +188,7 @@ export interface GetReqQueryObject {
|
||||
tableName?: string;
|
||||
}
|
||||
|
||||
export type SerializeQueryFnType = (param0: SerializeQueryParams) => string;
|
||||
|
||||
export interface SerializeQueryParams {
|
||||
query: any;
|
||||
}
|
||||
|
||||
// @ts-check
|
||||
export type SerializeQueryFnType = (query: any) => string;
|
||||
|
||||
export type DATASQUIREL_LoggedInUser = {
|
||||
id: number;
|
||||
|
2
package-shared/utils/serialize-query.d.ts
vendored
2
package-shared/utils/serialize-query.d.ts
vendored
@ -1,2 +1,2 @@
|
||||
export = serializeQuery;
|
||||
declare function serializeQuery(param0: import("../types").SerializeQueryParams): string;
|
||||
declare function serializeQuery(query: any): string;
|
||||
|
@ -3,8 +3,22 @@
|
||||
const EJSON = require("./ejson");
|
||||
|
||||
/** @type {import("../types").SerializeQueryFnType} */
|
||||
function serializeQuery({ query }) {
|
||||
function serializeQuery(query) {
|
||||
let str = "?";
|
||||
|
||||
if (typeof query !== "object") {
|
||||
console.log("Invalid Query type");
|
||||
return str;
|
||||
}
|
||||
if (Array.isArray(query)) {
|
||||
console.log("Query is an Array. This is invalid.");
|
||||
return str;
|
||||
}
|
||||
if (!query) {
|
||||
console.log("No Query provided.");
|
||||
return str;
|
||||
}
|
||||
|
||||
const keys = Object.keys(query);
|
||||
|
||||
/** @type {string[]} */
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/datasquirel",
|
||||
"version": "3.0.8",
|
||||
"version": "3.0.9",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
|
Loading…
Reference in New Issue
Block a user