Discord wasn't aborting correctly when the key wasn't configured. Livestream test still used an old schema. Configs needed to be updated in commands/templates

main
Zed A. Shaw 2 years ago
parent a9f23581de
commit 82c3ac2aad
  1. 2
      README.md
  2. 31
      commands/templates/client/config.js
  3. 24
      commands/templates/emails/config.js
  4. 14
      commands/templates/secrets/config.json
  5. 4
      lib/queues.js
  6. 2
      queues/discord.js
  7. 1
      tests/ui/livestream.js

@ -17,3 +17,5 @@ If this doesn't work then this might https://github.com/nodejs/node-gyp/blob/mai
``` ```
npm explore npm/node_modules/@npmcli/run-script -g -- npm_config_global=false npm install node-gyp@latest npm explore npm/node_modules/@npmcli/run-script -g -- npm_config_global=false npm install node-gyp@latest
``` ```
There's also an issue with installing node-pre-gyp where it seems you need to install @mapbox/node-pre-gyp and also node-pre-gyp.

@ -4,28 +4,37 @@
* is allowed to see. Anything else should go in lib/config.js and * is allowed to see. Anything else should go in lib/config.js and
* *never* import that file in any client/* files. * *never* import that file in any client/* files.
*/ */
export const fake_payments = false; export const fake_payments = true;
export const webtorrent = { export const webtorrent = {
announce: "https://localhost:5001/tracker",
use_dht: false, use_dht: false,
private: true, private: true
tracker: true,
webSeeds: true,
maxConns: 50
} }
export const btcpay_url = 'https://btc.yourpaymentsite.com/modal/btcpay.js'; export const product = {
price: 20,
currency: 'USD',
description: 'Super Product',
id: 1
}
export const btcpay_url = 'https://pay.yoursite.com/modal/btcpay.js';
export const product_id = 1; // brought over from ljsthw but need to adapt to the new product setting
export const product_id = product.id;
export const base_host = 'http://localhost:5001'; export const base_host = 'http://localhost:5001';
export const support_email = "help@yourcompany.com"; export const support_email = "help@yourcompany.com";
export const paypal_public = { export const paypal_public = {
disabled: true,
client_id: "YOUR PAYPAL PUBLIC KEY",
}
export const stripe_public = {
disabled: false, disabled: false,
client_id: "your_client_key_NOT_secret_key", client_id: "pk_MhuNltOn2Gq5VBZ9lMNxv4CB3wFOa"
} }
export const darkmode_default = "light"; export const darkmode_default = "light";
@ -34,6 +43,6 @@ export const register_enabled = true;
export const log_levels = ["debug", "warn", "info", "error", "table", "assert"]; export const log_levels = ["debug", "warn", "info", "error", "table", "assert"];
export const twitter_user = "@yourtwitter"; export const twitter_user = "@lzsthw";
export const price = 59; export const site_name = "localhost:5001";

@ -1,17 +1,17 @@
export const company = { export const company = {
owner: 'Person A. People', owner: 'Cool Coder',
product: 'Awesome Business', product: 'Super Product',
copyright_date: '2021', copyright_date: '2021',
name: 'BizTime, LLC', name: 'Super Company, LLC',
street: '1234 Weird Street Address', street: 'Address Address',
zip_code: '33333', zip_code: '99999',
city: 'Big City', city: 'City',
state: 'BC', state: 'CC',
country: 'USA', country: 'USA',
phone: '1-800-NO-WAY', phone: '1-800-NO-WAY',
mail: 'payments@biztime.com', mail: '"Person from PRODUCT" <help@supercool.com>',
website: 'localhost:5001', website: 'supercool.com',
credit_line: "CRDT", credit_line: "SUERPCOOL",
forum: "talk.biztime.com", forum: "supercool.com",
unsubscribe: "https://localhost:5001/client/#/email/unsubscribe/", unsubscribe: "https://supercool.com/client/#/email/unsubscribe/",
} }

@ -1,11 +1,19 @@
{ {
"paypal_private": { "paypal_private": {
"email": "payments@thesite.com", "email": "payments@thesite.com",
"client_id": "", "client_id": "PUBLICCLIENTID",
"secret": "", "secret": "SECRETKEY",
"disabled": false "disabled": true
}, },
"stripe_private": {
"email": "payments@thesite.com",
"client_id": "pk_YOURPUBLICID",
"secret": "YOURSECRET",
"endpoint_secret": "ENDPOINTSECRET",
"api_version": "2022-08-01",
"disabled": true
},
"btcpay_private": { "btcpay_private": {
"url": "https://yourbtcpayserver.com", "url": "https://yourbtcpayserver.com",
"auth": "your BTC pay auth key", "auth": "your BTC pay auth key",

@ -17,9 +17,9 @@ export const send_welcome = (user) => {
mail.add({user}); mail.add({user});
} }
export const send_receipt = (user, payment_id, course_id) => { export const send_receipt = (user, payment_id, product_id) => {
const mail = create("mail/receipt"); const mail = create("mail/receipt");
mail.add({user, payment_id, course_id}); mail.add({user, payment_id, product_id});
} }
export const send_reset = (user, ip_address, browser) => { export const send_reset = (user, ip_address, browser) => {

@ -38,7 +38,7 @@ const load_guild_channel = async (client) => {
} }
log.info("Connecting to discord server..."); log.info("Connecting to discord server...");
client.login(discord.token); await client.login(discord.token);
const [guild, channel] = await load_guild_channel(client); const [guild, channel] = await load_guild_channel(client);

@ -7,7 +7,6 @@ const fixture = {
"description": "Come hang out and watch me survive the first release of Learn JS the Hard Way.", "description": "Come hang out and watch me survive the first release of Learn JS the Hard Way.",
"starts_on": "2022-04-15 14:00:00-04", "starts_on": "2022-04-15 14:00:00-04",
"is_free": 0, "is_free": 0,
"course_id": 1,
"state": "pending", "state": "pending",
"viewer_count": 206, "viewer_count": 206,
"episode": 1 "episode": 1

Loading…
Cancel
Save