Skip to content

Commit c50d3ba

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

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ jobs:
4545
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4646
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
4747
secrets: |
48-
ENDPOINT
48+
CANGREBOT_API_ENDPOINT
4949
BOT_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

0 commit comments

Comments
 (0)