Skip to content

Commit 9ac92e4

Browse files
committed
chore: update bot endpoint
1 parent 88f7b09 commit 9ac92e4

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ jobs:
3939
- name: Deploy
4040
uses: cloudflare/wrangler-action@v3
4141
env:
42-
ENDPOINT: ${{ secrets.ENDPOINT }}
43-
BOT_APIKEY: ${{ secrets.BOT_APIKEY }}
42+
CANGREBOT_API_ENDPOINT: ${{ secrets.CANGREBOT_API_ENDPOINT }}
43+
CANGREBOT_APIKEY: ${{ secrets.CANGREBOT_APIKEY }}
4444
with:
4545
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4646
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
4747
secrets: |
48-
ENDPOINT
49-
BOT_APIKEY
48+
CANGREBOT_API_ENDPOINT
49+
CANGREBOT_APIKEY

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ Para construir y desplegar este proyecto, necesitarás lo siguiente:
2323

2424
### Variables de Entorno
2525

26-
- `ENDPOINT`: URL del punto final al que se enviarán los datos del reto diario.
27-
- `BOT_APIKEY`: Solo es necesario para nuestro caso que tenemos limitado nuestro endpoint para usuarios permitidos
26+
- `CANGREBOT_API_ENDPOINT`: URL del punto final al que se enviarán los datos del reto diario.
27+
- `CANGREBOT_APIKEY`: Solo es necesario para nuestro caso que tenemos limitado nuestro endpoint para usuarios permitidos
2828

2929
### Pruebas Locales
3030

@@ -36,5 +36,5 @@ Este proyecto está configurado para desplegar automáticamente utilizando los f
3636

3737
- `CLOUDFLARE_ACCOUNT_ID`: ID de tu cuenta de Cloudflare.
3838
- `CLOUDFLARE_API_TOKEN`: Token de API de Cloudflare.
39-
- `ENDPOINT`: URL de la API a la que se enviarán los datos del reto diario.
40-
- `BOT_APIKEY`: Solo es necesario para nuestro caso que tenemos limitado nuestro endpoint para usuarios permitidos
39+
- `CANGREBOT_API_ENDPOINT`: URL de la API a la que se enviarán los datos del reto diario.
40+
- `CANGREBOT_APIKEY`: Solo es necesario para nuestro caso que tenemos limitado nuestro endpoint para usuarios permitidos

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub async fn main(_e: ScheduledEvent, env: Env, _ctx: ScheduleContext) {
1919
console_error!("{info}")
2020
}));
2121
let bot_key = env
22-
.secret("BOT_APIKEY")
22+
.secret("CANGREBOT_APIKEY")
2323
.map(|e| e.to_string())
2424
.expect("Bot APIKEY Secret not found");
2525

@@ -43,8 +43,8 @@ pub async fn main(_e: ScheduledEvent, env: Env, _ctx: ScheduleContext) {
4343
return;
4444
}
4545

46-
let Ok(endpoint) = env.var("ENDPOINT").map(|e| e.to_string()) else {
47-
console_error!("Cannot get 'ENDPOINT' environment variable");
46+
let Ok(endpoint) = env.var("CANGREBOT_API_ENDPOINT").map(|e| e.to_string()) else {
47+
console_error!("Cannot get 'CANGREBOT_API_ENDPOINT' environment variable");
4848
return;
4949
};
5050

wrangler.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ fallthrough = false
1818
crons = ["10 0 * * *"]
1919

2020
[env.local.vars]
21-
ENDPOINT = "http://localhost:8080"
21+
CANGREBOT_API_ENDPOINT = "http://localhost:8080"

0 commit comments

Comments
 (0)