aboutsummaryrefslogtreecommitdiff
path: root/src/handlers/api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/handlers/api.rs')
-rw-r--r--src/handlers/api.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/handlers/api.rs b/src/handlers/api.rs
index 828f93c..af94f68 100644
--- a/src/handlers/api.rs
+++ b/src/handlers/api.rs
@@ -1,12 +1,12 @@
use crate::{
- app::{config::Job, PronounSet, State},
+ app::{config::Author, PronounSet, State},
handlers::Result,
post::Post,
};
use axum::extract::{Extension, Json, Path};
use lazy_static::lazy_static;
use prometheus::{opts, register_int_counter_vec, IntCounterVec};
-use std::sync::Arc;
+use std::{collections::HashMap, sync::Arc};
lazy_static! {
static ref BLOG: IntCounterVec = register_int_counter_vec!(
@@ -23,14 +23,14 @@ lazy_static! {
#[axum_macros::debug_handler]
#[instrument(skip(state))]
-pub async fn salary_transparency(Extension(state): Extension<Arc<State>>) -> Json<Vec<Job>> {
+pub async fn authors(Extension(state): Extension<Arc<State>>) -> Json<HashMap<String, Author>> {
super::HIT_COUNTER
- .with_label_values(&["salary_transparency_json"])
+ .with_label_values(&["authors_json"])
.inc();
let state = state.clone();
let cfg = state.cfg.clone();
- Json(cfg.job_history.clone())
+ Json(cfg.authors.clone())
}
#[axum_macros::debug_handler]