9 Commits

Author SHA1 Message Date
Logan Cusano
424d5ae749 #16 Fix bug in rss remove
All checks were successful
release-tag / release-image (push) Successful in 4m5s
DRB Tests / drb_mocha_tests (push) Successful in 43s
- A dependency of remove was missing the log object
- Updated discord output for all RSS commands
2024-05-26 22:42:54 -04:00
Logan Cusano
5c86185ef5 Update port in dockerfile
All checks were successful
release-tag / release-image (push) Successful in 3m42s
DRB Tests / drb_mocha_tests (push) Successful in 55s
2024-05-26 21:45:08 -04:00
Logan Cusano
e6de0f4453 Undo repo change
All checks were successful
release-tag / release-image (push) Successful in 4m24s
DRB Tests / drb_mocha_tests (push) Successful in 36s
- Does not add to the repo, changes the name
2024-05-26 21:30:47 -04:00
Logan Cusano
e8cfca1d8d Update build action
All checks were successful
release-tag / release-image (push) Successful in 5m15s
DRB Tests / drb_mocha_tests (push) Successful in 1m0s
- Attempt to place the package in the repo instead of my profile
2024-05-26 21:23:19 -04:00
Logan Cusano
dce0086fdb Update build action
All checks were successful
release-tag / release-image (push) Successful in 4m52s
DRB Tests / drb_mocha_tests (push) Successful in 41s
- Update repo name with proper vars
2024-05-26 21:12:57 -04:00
Logan Cusano
ad45d8f0ea Update repo name
Some checks failed
DRB Tests / drb_mocha_tests (push) Successful in 49s
release-tag / release-image (push) Failing after 4m1s
2024-05-26 20:49:32 -04:00
Logan Cusano
2c5cf3dac0 update all local IPs to public hostname
Some checks failed
release-tag / release-image (push) Failing after 22s
DRB Tests / drb_mocha_tests (push) Successful in 32s
2024-05-26 20:47:31 -04:00
Logan Cusano
a3223b716e update server build action
Some checks failed
release-tag / release-image (push) Failing after 20s
DRB Tests / drb_mocha_tests (push) Successful in 34s
- try public hostname instead of IP for docker login (to use HTTPS)
2024-05-26 20:45:16 -04:00
Logan Cusano
7a246f9e2a Update build action to explicitly set gitea as http
Some checks failed
release-tag / release-image (push) Failing after 16s
DRB Tests / drb_mocha_tests (push) Successful in 31s
2024-05-26 20:43:19 -04:00
6 changed files with 18 additions and 14 deletions

View File

@@ -25,14 +25,14 @@ jobs:
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with: # replace it with your local IP with: # replace it with your local IP
config-inline: | config-inline: |
[registry."${{ secrets.LOCAL_GITEA_IP}}:3000"] [registry."git.vpn.cusano.net"]
http = true http = false
insecure = true insecure = false
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
registry: ${{ secrets.LOCAL_GITEA_IP}}:3000 # replace it with your local IP registry: git.vpn.cusano.net # replace it with your local IP
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
@@ -52,5 +52,5 @@ jobs:
linux/arm64 linux/arm64
push: true push: true
tags: | # replace it with your local IP and tags tags: | # replace it with your local IP and tags
${{ secrets.LOCAL_GITEA_IP}}:3000/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }} git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
${{ secrets.LOCAL_GITEA_IP}}:3000/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }} git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}

View File

@@ -15,7 +15,7 @@ RUN npm install
COPY . . COPY . .
# Expose the port on which your Node.js application will run # Expose the port on which your Node.js application will run
EXPOSE 3000 EXPOSE 3420
# Command to run the Node.js application # Command to run the Node.js application
CMD ["node", "."] CMD ["node", "."]

View File

@@ -54,18 +54,19 @@ export const execute = async (nodeIo, interaction) => {
var category = interaction.options.getString('category'); var category = interaction.options.getString('category');
if (!category) category = "ALL"; if (!category) category = "ALL";
await interaction.reply(`Adding ${title} to the list of RSS sources, please wait...`);
await addSource(title, link, category, interaction.guildId, interaction.channelId, (err, result) => { await addSource(title, link, category, interaction.guildId, interaction.channelId, (err, result) => {
log.DEBUG("Result from adding entry", result); log.DEBUG("Result from adding entry", result);
if (result) { if (result) {
interaction.reply(`Successfully added ${title} to the list of RSS sources`); interaction.editReply(`Successfully added ${title} to the list of RSS sources`);
} else { } else {
interaction.reply(`${title} already exists in the list of RSS sources`); interaction.editReply(`${title} already exists in the list of RSS sources`);
} }
}); });
} catch (err) { } catch (err) {
log.ERROR(err) log.ERROR(err)
await interaction.reply(err.toString()); await interaction.editReply(err.toString());
} }
} }

View File

@@ -42,17 +42,17 @@ export async function autocomplete(nodeIo, interaction) {
export const execute = async (nodeIo, interaction) => { export const execute = async (nodeIo, interaction) => {
try { try {
var title = interaction.options.getString('title'); var title = interaction.options.getString('title');
interaction.reply(`Removing ${title} from the list of RSS sources, please wait...`); await interaction.reply(`Removing ${title} from the list of RSS sources, please wait...`);
const results = await deleteFeedByTitle(title); const results = await deleteFeedByTitle(title);
if (!results) { if (!results) {
log.WARN(`Failed to remove source: ${title}`); log.WARN(`Failed to remove source: ${title}`);
interaction.editReply(`Failed to remove source: '${title}'`); await interaction.editReply(`Failed to remove source: '${title}'`);
return; return;
} }
interaction.editReply(`${title} was successfully removed from the RSS sources.`) await interaction.editReply(`${title} was successfully removed from the RSS sources.`)
} catch (err) { } catch (err) {
log.ERROR(err) log.ERROR(err)
interaction.editReply(err.toString()); await interaction.editReply(err.toString());
} }
} }

View File

@@ -38,6 +38,7 @@ export const execute = async (nodeIo, interaction) => {
//await interaction.reply(`**Online Sockets: '${sockets}'**`); //await interaction.reply(`**Online Sockets: '${sockets}'**`);
await interaction.reply('Triggering RSS update'); await interaction.reply('Triggering RSS update');
await updateFeeds(interaction.client); await updateFeeds(interaction.client);
await interaction.editReply('RSS Update Completed');
//await interaction.channel.send('**Pong.**'); //await interaction.channel.send('**Pong.**');
} catch (err) { } catch (err) {
console.error(err); console.error(err);

View File

@@ -1,3 +1,5 @@
import { DebugBuilder } from "../modules/debugger.mjs";
const log = new DebugBuilder("server", "sourceManager");
import { createFeed, getFeedByLink, deleteFeedByLink } from '../modules/mongo-wrappers/mongoFeedsWrappers.mjs'; import { createFeed, getFeedByLink, deleteFeedByLink } from '../modules/mongo-wrappers/mongoFeedsWrappers.mjs';
class SourceManager { class SourceManager {