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
|
||||
cargo run
|
||||
cargo build
|
||||
|
||||
clean: ## Clean all build artifacts and dependencies
|
||||
@cargo clean
|
||||
|
@ -29,7 +29,7 @@ docker-publish: docker ## Build and publish docker images
|
|||
frontend: ## Build frontend assets
|
||||
@yarn install
|
||||
@-rm -rf ./static/cache/bundle/
|
||||
@-mkdir ./static/cache/bundle/css/
|
||||
@-mkdir -p ./static/cache/bundle/css/
|
||||
@yarn sass
|
||||
@yarn build
|
||||
@./scripts/bundle.sh
|
||||
|
|
|
@ -48,7 +48,7 @@ pub mod routes {
|
|||
// }
|
||||
|
||||
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 {
|
||||
pub const fn new() -> Benches {
|
||||
let submit = "/api/v1/benches/{campaign_id}/submit";
|
||||
let fetch = "/api/v1/benches/{campaign_id}/fetch";
|
||||
let register = "/api/v1/benches/register";
|
||||
let scope = "/api/v1/benches/";
|
||||
let submit = "/survey/api/v1/benches/{campaign_id}/submit";
|
||||
let fetch = "/survey/api/v1/benches/{campaign_id}/fetch";
|
||||
let register = "/survey/api/v1/benches/register";
|
||||
let scope = "/survey/api/v1/benches/";
|
||||
Benches {
|
||||
submit,
|
||||
register,
|
||||
|
|
|
@ -137,7 +137,7 @@ pub fn get_survey_identity_service() -> IdentityService<CookieIdentityPolicy> {
|
|||
IdentityService::new(
|
||||
CookieIdentityPolicy::new(cookie_secret.as_bytes())
|
||||
.name("survey-id")
|
||||
.path(V1_API_ROUTES.benches.scope)
|
||||
.path("/survey")
|
||||
.max_age_secs(30 * 60)
|
||||
.domain(&SETTINGS.server.domain)
|
||||
.secure(false),
|
||||
|
|
Loading…
Reference in a new issue