Compare commits
9 Commits
automated-
...
424d5ae749
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
424d5ae749 | ||
|
|
5c86185ef5 | ||
|
|
e6de0f4453 | ||
|
|
e8cfca1d8d | ||
|
|
dce0086fdb | ||
|
|
ad45d8f0ea | ||
|
|
2c5cf3dac0 | ||
|
|
a3223b716e | ||
|
|
7a246f9e2a |
@@ -25,14 +25,14 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with: # replace it with your local IP
|
||||
config-inline: |
|
||||
[registry."${{ secrets.LOCAL_GITEA_IP}}:3000"]
|
||||
http = true
|
||||
insecure = true
|
||||
[registry."git.vpn.cusano.net"]
|
||||
http = false
|
||||
insecure = false
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
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 }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
@@ -52,5 +52,5 @@ jobs:
|
||||
linux/arm64
|
||||
push: true
|
||||
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 }}
|
||||
${{ 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 }}:${{ steps.meta.outputs.REPO_VERSION }}
|
||||
git.vpn.cusano.net/${{ vars.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}
|
||||
@@ -15,7 +15,7 @@ RUN npm install
|
||||
COPY . .
|
||||
|
||||
# Expose the port on which your Node.js application will run
|
||||
EXPOSE 3000
|
||||
EXPOSE 3420
|
||||
|
||||
# Command to run the Node.js application
|
||||
CMD ["node", "."]
|
||||
|
||||
@@ -54,18 +54,19 @@ export const execute = async (nodeIo, interaction) => {
|
||||
var category = interaction.options.getString('category');
|
||||
|
||||
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) => {
|
||||
log.DEBUG("Result from adding entry", 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 {
|
||||
interaction.reply(`${title} already exists in the list of RSS sources`);
|
||||
interaction.editReply(`${title} already exists in the list of RSS sources`);
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
log.ERROR(err)
|
||||
await interaction.reply(err.toString());
|
||||
await interaction.editReply(err.toString());
|
||||
}
|
||||
}
|
||||
@@ -42,17 +42,17 @@ export async function autocomplete(nodeIo, interaction) {
|
||||
export const execute = async (nodeIo, interaction) => {
|
||||
try {
|
||||
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);
|
||||
if (!results) {
|
||||
log.WARN(`Failed to remove source: ${title}`);
|
||||
interaction.editReply(`Failed to remove source: '${title}'`);
|
||||
await interaction.editReply(`Failed to remove source: '${title}'`);
|
||||
return;
|
||||
}
|
||||
interaction.editReply(`${title} was successfully removed from the RSS sources.`)
|
||||
await interaction.editReply(`${title} was successfully removed from the RSS sources.`)
|
||||
} catch (err) {
|
||||
log.ERROR(err)
|
||||
interaction.editReply(err.toString());
|
||||
await interaction.editReply(err.toString());
|
||||
}
|
||||
}
|
||||
@@ -38,6 +38,7 @@ export const execute = async (nodeIo, interaction) => {
|
||||
//await interaction.reply(`**Online Sockets: '${sockets}'**`);
|
||||
await interaction.reply('Triggering RSS update');
|
||||
await updateFeeds(interaction.client);
|
||||
await interaction.editReply('RSS Update Completed');
|
||||
//await interaction.channel.send('**Pong.**');
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
||||
@@ -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';
|
||||
|
||||
class SourceManager {
|
||||
|
||||
Reference in New Issue
Block a user