Skip to content

Commit

Permalink
uncomment page route auth
Browse files Browse the repository at this point in the history
  • Loading branch information
indpurvesh committed Nov 17, 2023
1 parent 39ec59a commit 0718d92
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
20 changes: 10 additions & 10 deletions public/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -1460,6 +1460,11 @@ select {
border-color: rgb(55 65 81 / var(--tw-border-opacity));
}

.border-primary-600 {
--tw-border-opacity: 1;
border-color: rgb(147 51 234 / var(--tw-border-opacity));
}

.border-red-600 {
--tw-border-opacity: 1;
border-color: rgb(220 38 38 / var(--tw-border-opacity));
Expand All @@ -1474,11 +1479,6 @@ select {
border-color: rgb(255 255 255 / var(--tw-border-opacity));
}

.border-primary-600 {
--tw-border-opacity: 1;
border-color: rgb(147 51 234 / var(--tw-border-opacity));
}

.bg-black {
--tw-bg-opacity: 1;
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
Expand Down Expand Up @@ -2179,6 +2179,11 @@ select {
background-color: rgb(55 65 81 / var(--tw-bg-opacity));
}

.hover\:bg-primary-500:hover {
--tw-bg-opacity: 1;
background-color: rgb(168 85 247 / var(--tw-bg-opacity));
}

.hover\:bg-primary-700:hover {
--tw-bg-opacity: 1;
background-color: rgb(126 34 206 / var(--tw-bg-opacity));
Expand All @@ -2189,11 +2194,6 @@ select {
background-color: rgb(239 68 68 / var(--tw-bg-opacity));
}

.hover\:bg-primary-500:hover {
--tw-bg-opacity: 1;
background-color: rgb(168 85 247 / var(--tw-bg-opacity));
}

.hover\:text-blue-500:hover {
--tw-text-opacity: 1;
color: rgb(59 130 246 / var(--tw-text-opacity));
Expand Down
8 changes: 4 additions & 4 deletions src/api/page/page_routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ pub fn page_routes(state: Arc<AvoRedState>) -> Router {
"/admin/update-page/:page_id",
post(update_page_handler),
)
// .route_layer(middleware::from_fn_with_state(
// state.clone(),
// require_authentication,
// ))
.route_layer(middleware::from_fn_with_state(
state.clone(),
require_authentication,
))
.with_state(state)
}
2 changes: 1 addition & 1 deletion src/api/rest_api/rest_api_routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ use crate::avored_state::AvoRedState;

pub fn rest_api_routes(state: Arc<AvoRedState>) -> Router {
Router::new()
.route("/api/health-check", get(health_check_api_handler))
.route("/api/component-all", get(component_all_api_handler))
// .route_layer(middleware::from_fn_with_state(
// state.clone(),
// require_authentication,
// ))
.route("/api/health-check", get(health_check_api_handler))
.with_state(state)
}
2 changes: 1 addition & 1 deletion src/repositories/component_repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl ComponentRepository {
datastore: &Datastore,
database_session: &Session
) -> Result<Vec<ComponentModel>> {
let sql = "SELECT * FROM components";
let sql = "SELECT *, ->component_field<-components.* as fields FROM components";

let responses = datastore.execute(sql, database_session, None).await?;

Expand Down

0 comments on commit 0718d92

Please sign in to comment.