scope survey routes to /survey/
This commit is contained in:
parent
fb7125d5ab
commit
8c977ca0af
4 changed files with 8 additions and 8 deletions
4
Makefile
4
Makefile
|
@ -1,5 +1,5 @@
|
||||||
default: frontend ## Debug build
|
default: frontend ## Debug build
|
||||||
cargo run
|
cargo build
|
||||||
|
|
||||||
clean: ## Clean all build artifacts and dependencies
|
clean: ## Clean all build artifacts and dependencies
|
||||||
@cargo clean
|
@cargo clean
|
||||||
|
@ -29,7 +29,7 @@ docker-publish: docker ## Build and publish docker images
|
||||||
frontend: ## Build frontend assets
|
frontend: ## Build frontend assets
|
||||||
@yarn install
|
@yarn install
|
||||||
@-rm -rf ./static/cache/bundle/
|
@-rm -rf ./static/cache/bundle/
|
||||||
@-mkdir ./static/cache/bundle/css/
|
@-mkdir -p ./static/cache/bundle/css/
|
||||||
@yarn sass
|
@yarn sass
|
||||||
@yarn build
|
@yarn build
|
||||||
@./scripts/bundle.sh
|
@./scripts/bundle.sh
|
||||||
|
|
|
@ -48,7 +48,7 @@ pub mod routes {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
pub fn get_delete_route(&self, campaign_id: &str) -> String {
|
pub fn get_delete_route(&self, campaign_id: &str) -> String {
|
||||||
self.delete.replace("{uuid}", &campaign_id)
|
self.delete.replace("{uuid}", campaign_id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,10 +60,10 @@ pub mod routes {
|
||||||
|
|
||||||
impl Benches {
|
impl Benches {
|
||||||
pub const fn new() -> Benches {
|
pub const fn new() -> Benches {
|
||||||
let submit = "/api/v1/benches/{campaign_id}/submit";
|
let submit = "/survey/api/v1/benches/{campaign_id}/submit";
|
||||||
let fetch = "/api/v1/benches/{campaign_id}/fetch";
|
let fetch = "/survey/api/v1/benches/{campaign_id}/fetch";
|
||||||
let register = "/api/v1/benches/register";
|
let register = "/survey/api/v1/benches/register";
|
||||||
let scope = "/api/v1/benches/";
|
let scope = "/survey/api/v1/benches/";
|
||||||
Benches {
|
Benches {
|
||||||
submit,
|
submit,
|
||||||
register,
|
register,
|
||||||
|
|
|
@ -137,7 +137,7 @@ pub fn get_survey_identity_service() -> IdentityService<CookieIdentityPolicy> {
|
||||||
IdentityService::new(
|
IdentityService::new(
|
||||||
CookieIdentityPolicy::new(cookie_secret.as_bytes())
|
CookieIdentityPolicy::new(cookie_secret.as_bytes())
|
||||||
.name("survey-id")
|
.name("survey-id")
|
||||||
.path(V1_API_ROUTES.benches.scope)
|
.path("/survey")
|
||||||
.max_age_secs(30 * 60)
|
.max_age_secs(30 * 60)
|
||||||
.domain(&SETTINGS.server.domain)
|
.domain(&SETTINGS.server.domain)
|
||||||
.secure(false),
|
.secure(false),
|
||||||
|
|
Loading…
Reference in a new issue