Roll Back compile version
This commit is contained in:
+33
-16
@@ -1,18 +1,35 @@
|
||||
import queryDSQLAPI from "../../functions/api/query-dsql-api";
|
||||
import path from "path";
|
||||
import grabAPIBasePath from "../../utils/grab-api-base-path";
|
||||
export default async function apiMediaDELETE(params) {
|
||||
const basePath = grabAPIBasePath({ paradigm: "media" });
|
||||
const mediaID = params.mediaID
|
||||
? typeof params.mediaID === "number"
|
||||
? String(params.mediaID)
|
||||
: params.mediaID
|
||||
: undefined;
|
||||
const finalPath = path.join(basePath, mediaID || "");
|
||||
const DELETE_MEDIA_RES = await queryDSQLAPI({
|
||||
method: "DELETE",
|
||||
path: finalPath,
|
||||
apiKey: params.apiKey,
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = apiMediaDELETE;
|
||||
const query_dsql_api_1 = __importDefault(require("../../functions/api/query-dsql-api"));
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const grab_api_base_path_1 = __importDefault(require("../../utils/grab-api-base-path"));
|
||||
function apiMediaDELETE(params) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const basePath = (0, grab_api_base_path_1.default)({ paradigm: "media" });
|
||||
const mediaID = params.mediaID
|
||||
? typeof params.mediaID === "number"
|
||||
? String(params.mediaID)
|
||||
: params.mediaID
|
||||
: undefined;
|
||||
const finalPath = path_1.default.join(basePath, mediaID || "");
|
||||
const DELETE_MEDIA_RES = yield (0, query_dsql_api_1.default)({
|
||||
method: "DELETE",
|
||||
path: finalPath,
|
||||
apiKey: params.apiKey,
|
||||
});
|
||||
return DELETE_MEDIA_RES;
|
||||
});
|
||||
return DELETE_MEDIA_RES;
|
||||
}
|
||||
|
||||
Vendored
+34
-17
@@ -1,19 +1,36 @@
|
||||
import queryDSQLAPI from "../../functions/api/query-dsql-api";
|
||||
import path from "path";
|
||||
import grabAPIBasePath from "../../utils/grab-api-base-path";
|
||||
export default async function apiMediaGET(params) {
|
||||
const basePath = grabAPIBasePath({ paradigm: "media" });
|
||||
const mediaID = params.mediaID
|
||||
? typeof params.mediaID === "number"
|
||||
? String(params.mediaID)
|
||||
: params.mediaID
|
||||
: undefined;
|
||||
const finalPath = path.join(basePath, mediaID || "");
|
||||
const GET_MEDIA_RES = await queryDSQLAPI({
|
||||
method: "GET",
|
||||
path: finalPath,
|
||||
query: params,
|
||||
apiKey: params.apiKey,
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = apiMediaGET;
|
||||
const query_dsql_api_1 = __importDefault(require("../../functions/api/query-dsql-api"));
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const grab_api_base_path_1 = __importDefault(require("../../utils/grab-api-base-path"));
|
||||
function apiMediaGET(params) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const basePath = (0, grab_api_base_path_1.default)({ paradigm: "media" });
|
||||
const mediaID = params.mediaID
|
||||
? typeof params.mediaID === "number"
|
||||
? String(params.mediaID)
|
||||
: params.mediaID
|
||||
: undefined;
|
||||
const finalPath = path_1.default.join(basePath, mediaID || "");
|
||||
const GET_MEDIA_RES = yield (0, query_dsql_api_1.default)({
|
||||
method: "GET",
|
||||
path: finalPath,
|
||||
query: params,
|
||||
apiKey: params.apiKey,
|
||||
});
|
||||
return GET_MEDIA_RES;
|
||||
});
|
||||
return GET_MEDIA_RES;
|
||||
}
|
||||
|
||||
+13
-8
@@ -1,9 +1,14 @@
|
||||
import apiMediaGET from "./get";
|
||||
import apiMediaPOST from "./post";
|
||||
import apiMediaDELETE from "./delete";
|
||||
const media = {
|
||||
get: apiMediaGET,
|
||||
add: apiMediaPOST,
|
||||
delete: apiMediaDELETE,
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
export default media;
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const get_1 = __importDefault(require("./get"));
|
||||
const post_1 = __importDefault(require("./post"));
|
||||
const delete_1 = __importDefault(require("./delete"));
|
||||
const media = {
|
||||
get: get_1.default,
|
||||
add: post_1.default,
|
||||
delete: delete_1.default,
|
||||
};
|
||||
exports.default = media;
|
||||
|
||||
+27
-10
@@ -1,12 +1,29 @@
|
||||
import queryDSQLAPI from "../../functions/api/query-dsql-api";
|
||||
import grabAPIBasePath from "../../utils/grab-api-base-path";
|
||||
export default async function apiMediaPOST(params) {
|
||||
const basePath = grabAPIBasePath({ paradigm: "media" });
|
||||
const POST_MEDIA_RES = await queryDSQLAPI({
|
||||
method: "POST",
|
||||
path: basePath,
|
||||
body: params,
|
||||
apiKey: params.apiKey,
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = apiMediaPOST;
|
||||
const query_dsql_api_1 = __importDefault(require("../../functions/api/query-dsql-api"));
|
||||
const grab_api_base_path_1 = __importDefault(require("../../utils/grab-api-base-path"));
|
||||
function apiMediaPOST(params) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const basePath = (0, grab_api_base_path_1.default)({ paradigm: "media" });
|
||||
const POST_MEDIA_RES = yield (0, query_dsql_api_1.default)({
|
||||
method: "POST",
|
||||
path: basePath,
|
||||
body: params,
|
||||
apiKey: params.apiKey,
|
||||
});
|
||||
return POST_MEDIA_RES;
|
||||
});
|
||||
return POST_MEDIA_RES;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user