Updates
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
import grabHostNames from "../../utils/grab-host-names";
|
||||
import apiGetUser from "../../functions/api/users/api-get-user";
|
||||
import {
|
||||
APIGetUserFunctionParams,
|
||||
GetUserFunctionReturn,
|
||||
APIResponseObject,
|
||||
GetUserParams,
|
||||
} from "../../types";
|
||||
import grabUserDSQLAPIPath from "../../utils/backend/users/grab-api-path";
|
||||
@@ -21,7 +19,7 @@ export default async function getUser({
|
||||
apiVersion = "v1",
|
||||
dbUserId,
|
||||
selectAll,
|
||||
}: GetUserParams): Promise<GetUserFunctionReturn> {
|
||||
}: GetUserParams): Promise<APIResponseObject> {
|
||||
/**
|
||||
* Initialize
|
||||
*/
|
||||
@@ -119,5 +117,5 @@ export default async function getUser({
|
||||
httpsRequest.end();
|
||||
});
|
||||
|
||||
return httpResponse as GetUserFunctionReturn;
|
||||
return httpResponse as APIResponseObject;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import encrypt from "../../functions/dsql/encrypt";
|
||||
import apiLoginUser from "../../functions/api/users/api-login";
|
||||
import getAuthCookieNames from "../../functions/backend/cookies/get-auth-cookie-names";
|
||||
import { writeAuthFile } from "../../functions/backend/auth/write-auth-files";
|
||||
import {
|
||||
APILoginFunctionParams,
|
||||
APIResponseObject,
|
||||
DATASQUIREL_LoggedInUser,
|
||||
LoginUserParam,
|
||||
} from "../../types";
|
||||
import debugLog from "../../utils/logging/debug-log";
|
||||
@@ -21,9 +17,7 @@ function debugFn(log: any, label?: string) {
|
||||
/**
|
||||
* # Login A user
|
||||
*/
|
||||
export default async function loginUser<
|
||||
T extends DATASQUIREL_LoggedInUser = DATASQUIREL_LoggedInUser
|
||||
>({
|
||||
export default async function loginUser({
|
||||
apiKey,
|
||||
payload,
|
||||
database,
|
||||
|
||||
Reference in New Issue
Block a user