change localhost to http

This commit is contained in:
Stachelbeere1248 2025-03-16 12:27:30 +01:00
parent 55cdbaf196
commit f5768998b9
Signed by: Stachelbeere1248
SSH key fingerprint: SHA256:IozEKdw2dB8TZxkpPdMxcWSoWTIMwoLaCcZJ1AJnY2o
10 changed files with 11 additions and 98 deletions

View file

@ -1,11 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

View file

@ -1,22 +0,0 @@
name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --release --verbose
- name: Run tests
run: cargo test --verbose

8
.idea/.gitignore generated vendored
View file

@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

13
.idea/ZMP-bot.iml generated
View file

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="EMPTY_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/commands/T/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/src/commands/T/target" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View file

@ -1,11 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="RsMainFunctionNotFound" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
</profile>
</component>

7
.idea/misc.xml generated
View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="ASK" />
<option name="description" value="" />
</component>
</project>

8
.idea/modules.xml generated
View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/../zmp-bot/.idea/ZMP-bot.iml" filepath="$PROJECT_DIR$/../zmp-bot/.idea/ZMP-bot.iml" />
</modules>
</component>
</project>

7
.idea/vcs.xml generated
View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/../zmp-bot" vcs="Git" />
</component>
</project>

View file

@ -32,7 +32,7 @@ pub(crate) enum ListType {
}
pub(crate) async fn fetch_all(client: &Client) -> Result<Vec<Bot>, Error> {
let url = "https://localhost:6969/list";
let url = "http://localhost:6969/list";
let response: Vec<Bot> = client
.get(url)
.send()

View file

@ -13,9 +13,9 @@ macro_rules! reply_fail_handler {
#[derive(Debug)]
pub enum Error {
SqlxError(sqlx::Error),
ApiError(reqwest::Error),
SerenityError(serenity::Error),
Sqlx(sqlx::Error),
Api(reqwest::Error),
Serenity(serenity::Error),
OnCooldown(std::time::Duration),
Other(String),
}
@ -23,9 +23,9 @@ pub enum Error {
impl Display for Error {
fn fmt(&self, f: &mut Formatter) -> FmtResult {
match self {
Error::SqlxError(e) => write!(f, "SQLx Error: {}", e),
Error::ApiError(e) => write!(f, "HTTPS Error:\n{}", e),
Error::SerenityError(e) => write!(f, "Discord Error:\n {}", e),
Error::Sqlx(e) => write!(f, "SQLx Error: {}", e),
Error::Api(e) => write!(f, "HTTPS Error:\n{}", e),
Error::Serenity(e) => write!(f, "Discord Error:\n {}", e),
Error::OnCooldown(d) => write!(
f,
"This command is on cooldown. {}s remaining.",
@ -38,23 +38,23 @@ impl Display for Error {
impl From<sqlx::Error> for Error {
fn from(error: sqlx::Error) -> Self {
Error::SqlxError(error)
Error::Sqlx(error)
}
}
impl From<reqwest::Error> for Error {
fn from(error: reqwest::Error) -> Self {
Error::ApiError(error)
Error::Api(error)
}
}
impl From<serenity::Error> for Error {
fn from(error: serenity::Error) -> Self {
Error::SerenityError(error)
Error::Serenity(error)
}
}
pub(crate) async fn handle_error<'a>(error: FrameworkError<'a, Data, Error>) {
pub(crate) async fn handle_error(error: FrameworkError<'_, Data, Error>) {
match error {
FrameworkError::Command { error, ctx, .. } => {
reply_fail_handler!(ctx.send(