mirror of
https://github.com/catdevnull/preciazo.git
synced 2024-11-25 19:16:19 +00:00
Compare commits
No commits in common. "2b6deadf6cbb5b153fb71801267a62eaa988fd58" and "b46b087bc67e2cb4274cfffb71d6a6bae8d81f54" have entirely different histories.
2b6deadf6c
...
b46b087bc6
2 changed files with 3 additions and 12 deletions
|
@ -13,7 +13,6 @@ scrapeo "masivo" de precios y datos en supermercados argentinos
|
|||
- [SEPAME](https://sepame.net/): muestra todos los precios de todas las sucursales según el [dataset SEPA](https://datos.produccion.gob.ar/dataset/sepa-precios)
|
||||
- [Coto_bot](https://twitter.com/BotCoto) (repo: [Vosinepi/webScrapping_ETL_canasta_basica](https://github.com/Vosinepi/webScrapping_ETL_canasta_basica))
|
||||
- [@canastita_bot](https://twitter.com/canastita_bot) y [@asadito_bot](https://twitter.com/asadito_bot) de [Charly Maslaton](https://twitter.com/charlymasla)
|
||||
- [Yoper](https://www.yoper.com.ar/) ([@YoperLATAM](https://x.com/YoperLATAM))
|
||||
|
||||
## componentes
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use axum::{
|
||||
extract::{Path, State},
|
||||
http::{Response, StatusCode},
|
||||
http::StatusCode,
|
||||
response::IntoResponse,
|
||||
routing::get,
|
||||
Json, Router,
|
||||
|
@ -17,15 +17,8 @@ use sqlx::{
|
|||
};
|
||||
use std::{env, str::FromStr, time::Duration};
|
||||
|
||||
async fn index() -> impl IntoResponse {
|
||||
Response::builder()
|
||||
.header("Content-Type", "text/html")
|
||||
.body("<style>html,body{font-family:sans-serif;}</style>
|
||||
<h1>old preciazo API</h1>
|
||||
Hello, world! <a href=https://github.com/catdevnull/preciazo>catdevnull/preciazo</a><br>
|
||||
<a href=mailto:hola@nulo.in>hola@nulo.in</a>
|
||||
".to_string())
|
||||
.unwrap()
|
||||
async fn index() -> &'static str {
|
||||
"Hello, world! <a href=https://github.com/catdevnull/preciazo>catdevnull/preciazo</a>"
|
||||
}
|
||||
async fn healthcheck(State(pool): State<SqlitePool>) -> impl IntoResponse {
|
||||
let one_day_ago = chrono::Utc::now() - chrono::Duration::hours(25);
|
||||
|
@ -315,7 +308,6 @@ async fn main() {
|
|||
|
||||
let app = Router::new()
|
||||
.route("/", get(index))
|
||||
.route("/api/", get(index))
|
||||
.route("/api/healthcheck", get(healthcheck))
|
||||
.route("/api/0/best-selling-products", get(get_best_selling))
|
||||
.route("/api/0/ean/:ean/history", get(get_product_history))
|
||||
|
|
Loading…
Reference in a new issue