@@ -1,6 +1,5 @@
|
|||||||
import { gql } from "@apollo/client";
|
import { gql } from "@apollo/client";
|
||||||
import { notification } from "antd";
|
import { notification } from "antd";
|
||||||
import axios from "axios";
|
|
||||||
import jsreport from "@jsreport/browser-client";
|
import jsreport from "@jsreport/browser-client";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
@@ -9,7 +8,8 @@ import { setEmailOptions } from "../redux/email/email.actions";
|
|||||||
import { store } from "../redux/store";
|
import { store } from "../redux/store";
|
||||||
import client from "../utils/GraphQLClient";
|
import client from "../utils/GraphQLClient";
|
||||||
import { TemplateList } from "./TemplateConstants";
|
import { TemplateList } from "./TemplateConstants";
|
||||||
|
import cleanAxios from "./CleanAxios";
|
||||||
|
import axios from "axios";
|
||||||
const server = process.env.REACT_APP_REPORTS_SERVER_URL;
|
const server = process.env.REACT_APP_REPORTS_SERVER_URL;
|
||||||
|
|
||||||
jsreport.serverUrl = server;
|
jsreport.serverUrl = server;
|
||||||
@@ -26,10 +26,14 @@ export default async function RenderTemplate(
|
|||||||
if (window.jsr3) {
|
if (window.jsr3) {
|
||||||
jsreport.serverUrl = "https://reports3.test.imex.online/";
|
jsreport.serverUrl = "https://reports3.test.imex.online/";
|
||||||
}
|
}
|
||||||
|
const jsrAuth = (await axios.post("/utils/jsr")).data;
|
||||||
|
|
||||||
|
jsreport.headers["Authorization"] = jsrAuth;
|
||||||
|
|
||||||
//Query assets that match the template name. Must be in format <<templateName>>.query
|
//Query assets that match the template name. Must be in format <<templateName>>.query
|
||||||
let { contextData, useShopSpecificTemplate } = await fetchContextData(
|
let { contextData, useShopSpecificTemplate } = await fetchContextData(
|
||||||
templateObject
|
templateObject,
|
||||||
|
jsrAuth
|
||||||
);
|
);
|
||||||
|
|
||||||
const { ignoreCustomMargins } = Templates[templateObject.name];
|
const { ignoreCustomMargins } = Templates[templateObject.name];
|
||||||
@@ -137,11 +141,15 @@ export async function RenderTemplates(
|
|||||||
//Query assets that match the template name. Must be in format <<templateName>>.query
|
//Query assets that match the template name. Must be in format <<templateName>>.query
|
||||||
let unsortedTemplatesAndData = [];
|
let unsortedTemplatesAndData = [];
|
||||||
let proms = [];
|
let proms = [];
|
||||||
|
const jsrAuth = (await axios.post("/utils/jsr")).data;
|
||||||
|
jsreport.headers["Authorization"] = jsrAuth;
|
||||||
|
|
||||||
templateObjects.forEach((template) => {
|
templateObjects.forEach((template) => {
|
||||||
proms.push(
|
proms.push(
|
||||||
(async () => {
|
(async () => {
|
||||||
let { contextData, useShopSpecificTemplate } = await fetchContextData(
|
let { contextData, useShopSpecificTemplate } = await fetchContextData(
|
||||||
template
|
template,
|
||||||
|
jsrAuth
|
||||||
);
|
);
|
||||||
unsortedTemplatesAndData.push({
|
unsortedTemplatesAndData.push({
|
||||||
templateObject: template,
|
templateObject: template,
|
||||||
@@ -298,19 +306,22 @@ export const GenerateDocuments = async (templates) => {
|
|||||||
await RenderTemplates(templates, bodyshop);
|
await RenderTemplates(templates, bodyshop);
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchContextData = async (templateObject) => {
|
const fetchContextData = async (templateObject, jsrAuth) => {
|
||||||
const bodyshop = store.getState().user.bodyshop;
|
const bodyshop = store.getState().user.bodyshop;
|
||||||
|
|
||||||
jsreport.headers["Authorization"] =
|
jsreport.headers["FirebaseAuthorization"] =
|
||||||
"Bearer " + (await auth.currentUser.getIdToken());
|
"Bearer " + (await auth.currentUser.getIdToken());
|
||||||
|
|
||||||
const folders = await axios.get(`${server}/odata/folders`);
|
const folders = await cleanAxios.get(`${server}/odata/folders`, {
|
||||||
|
headers: { Authorization: jsrAuth },
|
||||||
|
});
|
||||||
const shopSpecificFolder = folders.data.value.find(
|
const shopSpecificFolder = folders.data.value.find(
|
||||||
(f) => f.name === bodyshop.imexshopid
|
(f) => f.name === bodyshop.imexshopid
|
||||||
);
|
);
|
||||||
|
|
||||||
const jsReportQueries = await axios.get(
|
const jsReportQueries = await cleanAxios.get(
|
||||||
`${server}/odata/assets?$filter=name eq '${templateObject.name}.query'`
|
`${server}/odata/assets?$filter=name eq '${templateObject.name}.query'`,
|
||||||
|
{ headers: { Authorization: jsrAuth } }
|
||||||
);
|
);
|
||||||
|
|
||||||
let templateQueryToExecute;
|
let templateQueryToExecute;
|
||||||
|
|||||||
@@ -694,6 +694,9 @@
|
|||||||
num_retries: 3
|
num_retries: 3
|
||||||
timeout_sec: 60
|
timeout_sec: 60
|
||||||
webhook_from_env: HASURA_API_URL
|
webhook_from_env: HASURA_API_URL
|
||||||
|
headers:
|
||||||
|
- name: event-secret
|
||||||
|
value_from_env: EVENT_SECRET
|
||||||
request_transform:
|
request_transform:
|
||||||
method: POST
|
method: POST
|
||||||
query_params: {}
|
query_params: {}
|
||||||
@@ -4112,6 +4115,9 @@
|
|||||||
num_retries: 3
|
num_retries: 3
|
||||||
timeout_sec: 60
|
timeout_sec: 60
|
||||||
webhook_from_env: HASURA_API_URL
|
webhook_from_env: HASURA_API_URL
|
||||||
|
headers:
|
||||||
|
- name: event-secret
|
||||||
|
value_from_env: EVENT_SECRET
|
||||||
request_transform:
|
request_transform:
|
||||||
method: POST
|
method: POST
|
||||||
query_params: {}
|
query_params: {}
|
||||||
@@ -4562,6 +4568,9 @@
|
|||||||
num_retries: 3
|
num_retries: 3
|
||||||
timeout_sec: 60
|
timeout_sec: 60
|
||||||
webhook_from_env: HASURA_API_URL
|
webhook_from_env: HASURA_API_URL
|
||||||
|
headers:
|
||||||
|
- name: event-secret
|
||||||
|
value_from_env: EVENT_SECRET
|
||||||
request_transform:
|
request_transform:
|
||||||
method: POST
|
method: POST
|
||||||
query_params: {}
|
query_params: {}
|
||||||
@@ -5015,6 +5024,9 @@
|
|||||||
num_retries: 3
|
num_retries: 3
|
||||||
timeout_sec: 60
|
timeout_sec: 60
|
||||||
webhook_from_env: HASURA_API_URL
|
webhook_from_env: HASURA_API_URL
|
||||||
|
headers:
|
||||||
|
- name: event-secret
|
||||||
|
value_from_env: EVENT_SECRET
|
||||||
request_transform:
|
request_transform:
|
||||||
method: POST
|
method: POST
|
||||||
query_params: {}
|
query_params: {}
|
||||||
@@ -5957,6 +5969,9 @@
|
|||||||
num_retries: 3
|
num_retries: 3
|
||||||
timeout_sec: 60
|
timeout_sec: 60
|
||||||
webhook_from_env: HASURA_API_URL
|
webhook_from_env: HASURA_API_URL
|
||||||
|
headers:
|
||||||
|
- name: event-secret
|
||||||
|
value_from_env: EVENT_SECRET
|
||||||
request_transform:
|
request_transform:
|
||||||
method: POST
|
method: POST
|
||||||
query_params: {}
|
query_params: {}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."job_conversations_jobid";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "job_conversations_jobid" on
|
||||||
|
"public"."job_conversations" using btree ("jobid");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."job_conversations_conversationid";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "job_conversations_conversationid" on
|
||||||
|
"public"."job_conversations" using btree ("conversationid");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."job_conversations_job_and_conversation_id";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "job_conversations_job_and_conversation_id" on
|
||||||
|
"public"."job_conversations" using btree ("conversationid", "jobid");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_payments_jobid";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_payments_jobid" on
|
||||||
|
"public"."payments" using btree ("jobid");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_mixdata_jobid";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_mixdata_jobid" on
|
||||||
|
"public"."mixdata" using btree ("jobid");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_notes_jobid";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_notes_jobid" on
|
||||||
|
"public"."notes" using btree ("jobid");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_users_authid";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_users_authid" on
|
||||||
|
"public"."users" using btree ("authid");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_employees_shopid";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_employees_shopid" on
|
||||||
|
"public"."employees" using btree ("shopid");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_employee_vacation_employeeid";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_employee_vacation_employeeid" on
|
||||||
|
"public"."employee_vacation" using btree ("employeeid");
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_counters_shopid_type";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_counters_shopid_type" on
|
||||||
|
"public"."counters" using btree ("shopid", "countertype");
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- CREATE INDEX idx_jobs_inproduction_true ON jobs(inproduction) WHERE inproduction = true;
|
||||||
1
hasura/migrations/1682699741754_run_sql_migration/up.sql
Normal file
1
hasura/migrations/1682699741754_run_sql_migration/up.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CREATE INDEX idx_jobs_inproduction_true ON jobs(inproduction) WHERE inproduction = true;
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- CREATE INDEX idx_associations_active_true ON associations(active) WHERE active = true;
|
||||||
1
hasura/migrations/1682703406197_run_sql_migration/up.sql
Normal file
1
hasura/migrations/1682703406197_run_sql_migration/up.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CREATE INDEX idx_associations_active_true ON associations(active) WHERE active = true;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP INDEX IF EXISTS "public"."idx_associations_shopid_user";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE INDEX "idx_associations_shopid_user" on
|
||||||
|
"public"."associations" using btree ("shopid", "useremail", "active");
|
||||||
40
server.js
40
server.js
@@ -125,7 +125,11 @@ app.post(
|
|||||||
twilio.webhook({ validate: process.env.NODE_ENV === "PRODUCTION" }),
|
twilio.webhook({ validate: process.env.NODE_ENV === "PRODUCTION" }),
|
||||||
smsStatus.status
|
smsStatus.status
|
||||||
);
|
);
|
||||||
app.post("/sms/markConversationRead", smsStatus.markConversationRead);
|
app.post(
|
||||||
|
"/sms/markConversationRead",
|
||||||
|
fb.validateFirebaseIdToken,
|
||||||
|
smsStatus.markConversationRead
|
||||||
|
);
|
||||||
|
|
||||||
var job = require("./server/job/job");
|
var job = require("./server/job/job");
|
||||||
app.post("/job/totals", fb.validateFirebaseIdToken, job.totals);
|
app.post("/job/totals", fb.validateFirebaseIdToken, job.totals);
|
||||||
@@ -153,11 +157,11 @@ app.post("/scheduling/job", fb.validateFirebaseIdToken, scheduling.job);
|
|||||||
var inlineCss = require("./server/render/inlinecss");
|
var inlineCss = require("./server/render/inlinecss");
|
||||||
app.post("/render/inlinecss", fb.validateFirebaseIdToken, inlineCss.inlinecss);
|
app.post("/render/inlinecss", fb.validateFirebaseIdToken, inlineCss.inlinecss);
|
||||||
|
|
||||||
app.post(
|
// app.post(
|
||||||
"/notifications/send",
|
// "/notifications/send",
|
||||||
|
|
||||||
fb.sendNotification
|
// fb.sendNotification
|
||||||
);
|
// );
|
||||||
app.post("/notifications/subscribe", fb.validateFirebaseIdToken, fb.subscribe);
|
app.post("/notifications/subscribe", fb.validateFirebaseIdToken, fb.subscribe);
|
||||||
app.post(
|
app.post(
|
||||||
"/notifications/unsubscribe",
|
"/notifications/unsubscribe",
|
||||||
@@ -194,13 +198,13 @@ app.post(
|
|||||||
);
|
);
|
||||||
|
|
||||||
//Stripe Processing
|
//Stripe Processing
|
||||||
var stripe = require("./server/stripe/payment");
|
// var stripe = require("./server/stripe/payment");
|
||||||
app.post("/stripe/payment", fb.validateFirebaseIdToken, stripe.payment);
|
// app.post("/stripe/payment", fb.validateFirebaseIdToken, stripe.payment);
|
||||||
app.post(
|
// app.post(
|
||||||
"/stripe/mobilepayment",
|
// "/stripe/mobilepayment",
|
||||||
fb.validateFirebaseIdToken,
|
// fb.validateFirebaseIdToken,
|
||||||
stripe.mobile_payment
|
// stripe.mobile_payment
|
||||||
);
|
// );
|
||||||
|
|
||||||
//Tech Console
|
//Tech Console
|
||||||
var tech = require("./server/tech/tech");
|
var tech = require("./server/tech/tech");
|
||||||
@@ -208,7 +212,7 @@ app.post("/tech/login", fb.validateFirebaseIdToken, tech.techLogin);
|
|||||||
|
|
||||||
var utils = require("./server/utils/utils");
|
var utils = require("./server/utils/utils");
|
||||||
app.post("/utils/time", utils.servertime);
|
app.post("/utils/time", utils.servertime);
|
||||||
|
app.post("/utils/jsr", fb.validateFirebaseIdToken, utils.jsrAuth);
|
||||||
var qbo = require("./server/accounting/qbo/qbo");
|
var qbo = require("./server/accounting/qbo/qbo");
|
||||||
app.post("/qbo/authorize", fb.validateFirebaseIdToken, qbo.authorize);
|
app.post("/qbo/authorize", fb.validateFirebaseIdToken, qbo.authorize);
|
||||||
app.get("/qbo/callback", qbo.callback);
|
app.get("/qbo/callback", qbo.callback);
|
||||||
@@ -221,7 +225,7 @@ app.post("/data/ah", data.autohouse);
|
|||||||
app.post("/record-handler/arms", data.arms);
|
app.post("/record-handler/arms", data.arms);
|
||||||
|
|
||||||
var taskHandler = require("./server/tasks/tasks");
|
var taskHandler = require("./server/tasks/tasks");
|
||||||
app.post("/taskHandler", taskHandler.taskHandler);
|
app.post("/taskHandler", fb.validateFirebaseIdToken, taskHandler.taskHandler);
|
||||||
|
|
||||||
var mixdataUpload = require("./server/mixdata/mixdata");
|
var mixdataUpload = require("./server/mixdata/mixdata");
|
||||||
|
|
||||||
@@ -259,10 +263,10 @@ app.post(
|
|||||||
|
|
||||||
var ioevent = require("./server/ioevent/ioevent");
|
var ioevent = require("./server/ioevent/ioevent");
|
||||||
app.post("/ioevent", ioevent.default);
|
app.post("/ioevent", ioevent.default);
|
||||||
app.post("/newlog", (req, res) => {
|
// app.post("/newlog", (req, res) => {
|
||||||
const { message, type, user, record, object } = req.body;
|
// const { message, type, user, record, object } = req.body;
|
||||||
logger.log(message, type, user, record, object);
|
// logger.log(message, type, user, record, object);
|
||||||
});
|
// });
|
||||||
|
|
||||||
var os = require("./server/opensearch/os-handler");
|
var os = require("./server/opensearch/os-handler");
|
||||||
app.post(
|
app.post(
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ async function PbsCalculateAllocationsAp(socket, billids) {
|
|||||||
|
|
||||||
let APAmount = Dinero();
|
let APAmount = Dinero();
|
||||||
Object.keys(billHash).map((key) => {
|
Object.keys(billHash).map((key) => {
|
||||||
if (billHash[key].Amount.getAmount() > 0) {
|
if (billHash[key].Amount.getAmount() > 0 || billHash[key].Amount.getAmount() < 0) {
|
||||||
transactionObject.Posting.Lines.push({
|
transactionObject.Posting.Lines.push({
|
||||||
...billHash[key],
|
...billHash[key],
|
||||||
Amount: billHash[key].Amount.toFormat("0.00"),
|
Amount: billHash[key].Amount.toFormat("0.00"),
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ async function getEntegralShopData() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
exports.default = async (req, res) => {
|
exports.default = async (req, res) => {
|
||||||
res.sendStatus(200);
|
res.sendStatus(401);
|
||||||
return;
|
return;
|
||||||
//Query for the List of Bodyshop Clients.
|
//Query for the List of Bodyshop Clients.
|
||||||
const job = req.body.event.data.new;
|
const job = req.body.event.data.new;
|
||||||
|
|||||||
@@ -40,6 +40,14 @@ exports.default = async (req, res) => {
|
|||||||
|
|
||||||
const specificShopIds = req.body.bodyshopIds; // ['uuid]
|
const specificShopIds = req.body.bodyshopIds; // ['uuid]
|
||||||
const { start, end, skipUpload } = req.body; //YYYY-MM-DD
|
const { start, end, skipUpload } = req.body; //YYYY-MM-DD
|
||||||
|
if (
|
||||||
|
!start ||
|
||||||
|
!moment(start).isValid ||
|
||||||
|
req.headers["x-imex-auth"] !== process.env.AUTOHOUSE_AUTH_TOKEN
|
||||||
|
) {
|
||||||
|
res.sendStatus(401);
|
||||||
|
return;
|
||||||
|
}
|
||||||
const allxmlsToUpload = [];
|
const allxmlsToUpload = [];
|
||||||
const allErrors = [];
|
const allErrors = [];
|
||||||
try {
|
try {
|
||||||
@@ -772,7 +780,9 @@ const CreateCosts = (job) => {
|
|||||||
billTotalsByCostCenters[
|
billTotalsByCostCenters[
|
||||||
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA
|
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA
|
||||||
] = Dinero({
|
] = Dinero({
|
||||||
amount: (job.mixdata[0] && job.mixdata[0].totalliquidcost * 100) || 0,
|
amount: Math.round(
|
||||||
|
((job.mixdata[0] && job.mixdata[0].totalliquidcost) || 0) * 100
|
||||||
|
),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
billTotalsByCostCenters[
|
billTotalsByCostCenters[
|
||||||
@@ -799,7 +809,7 @@ const CreateCosts = (job) => {
|
|||||||
(job.bodyshop.jc_hourly_rates &&
|
(job.bodyshop.jc_hourly_rates &&
|
||||||
job.bodyshop.jc_hourly_rates.mapa * 100) ||
|
job.bodyshop.jc_hourly_rates.mapa * 100) ||
|
||||||
0,
|
0,
|
||||||
}).multiply(materialsHours.mapaHrs)
|
}).multiply(job.job_totals.rates.mapa.hours)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -626,7 +626,7 @@ function GenerateCostingData(job) {
|
|||||||
billTotalsByCostCenters.additionalCosts[
|
billTotalsByCostCenters.additionalCosts[
|
||||||
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA
|
job.bodyshop.md_responsibility_centers.defaults.costs.MAPA
|
||||||
] = Dinero({
|
] = Dinero({
|
||||||
amount: (job.mixdata[0] && job.mixdata[0].totalliquidcost * 100) || 0,
|
amount: Math.round((job.mixdata[0] && job.mixdata[0].totalliquidcost || 0) * 100)
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
billTotalsByCostCenters.additionalCosts[
|
billTotalsByCostCenters.additionalCosts[
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ require("dotenv").config({
|
|||||||
});
|
});
|
||||||
async function StatusTransition(req, res) {
|
async function StatusTransition(req, res) {
|
||||||
if (req.headers["event-secret"] !== process.env.EVENT_SECRET) {
|
if (req.headers["event-secret"] !== process.env.EVENT_SECRET) {
|
||||||
res.status(403).send("Unauthorized");
|
res.status(401).send("Unauthorized");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
res.sendStatus(200);
|
res.sendStatus(200);
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ const getClient = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function OpenSearchUpdateHandler(req, res) {
|
async function OpenSearchUpdateHandler(req, res) {
|
||||||
|
if (req.headers["event-secret"] !== process.env.EVENT_SECRET) {
|
||||||
|
res.status(401).send("Unauthorized");
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
var osClient = await getClient();
|
var osClient = await getClient();
|
||||||
// const osClient = new Client({
|
// const osClient = new Client({
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
exports.servertime = (req, res) => {
|
exports.servertime = (req, res) => {
|
||||||
res.status(200).send(new Date());
|
res.status(200).send(new Date());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.jsrAuth = async (req, res) => {
|
||||||
|
res.send(
|
||||||
|
"Basic " +
|
||||||
|
Buffer.from(
|
||||||
|
`${process.env.JSR_USER}:${process.env.JSR_PASSWORD}`
|
||||||
|
).toString("base64")
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user