From 2d7f535afaafb63b58e8a6f8ba73578c4ffca3c0 Mon Sep 17 00:00:00 2001 From: realaravinth Date: Tue, 4 May 2021 10:02:44 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=20f817f?= =?UTF-8?q?4918206a66b8243cb57841f6757944f49f5=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- guard/docs/index.html | 2 +- .../panel/sitekey/add/constant.COMPONENT.html | 2 +- .../panel/sitekey/add/fn.add_sitekey.html | 2 +- guard/pages/panel/sitekey/add/index.html | 2 +- .../panel/sitekey/add/struct.IndexPage.html | 9 +++--- search-index.js | 2 +- src/guard/docs.rs.html | 32 +++++++++++++------ src/guard/pages/panel/sitekey/add.rs.html | 4 +++ 8 files changed, 36 insertions(+), 19 deletions(-) diff --git a/guard/docs/index.html b/guard/docs/index.html index 743b3957..9d808a80 100644 --- a/guard/docs/index.html +++ b/guard/docs/index.html @@ -1,7 +1,7 @@ guard::docs - Rust

Module guard::docs[][src]

Modules

+ Change settings

Module guard::docs[][src]

Modules

routes

Structs

Asset

Constants

DOCS

Functions

diff --git a/guard/pages/panel/sitekey/add/constant.COMPONENT.html b/guard/pages/panel/sitekey/add/constant.COMPONENT.html index 5b000ce1..03063119 100644 --- a/guard/pages/panel/sitekey/add/constant.COMPONENT.html +++ b/guard/pages/panel/sitekey/add/constant.COMPONENT.html @@ -1,5 +1,5 @@ guard::pages::panel::sitekey::add::COMPONENT - Rust

Constant guard::pages::panel::sitekey::add::COMPONENT[][src]

const COMPONENT: &str = "Add Site Key";
+ Change settings

Constant guard::pages::panel::sitekey::add::COMPONENT[][src]

const COMPONENT: &str = "Add Site Key";
\ No newline at end of file diff --git a/guard/pages/panel/sitekey/add/fn.add_sitekey.html b/guard/pages/panel/sitekey/add/fn.add_sitekey.html index 0f2d5aa2..79dcd03d 100644 --- a/guard/pages/panel/sitekey/add/fn.add_sitekey.html +++ b/guard/pages/panel/sitekey/add/fn.add_sitekey.html @@ -1,5 +1,5 @@ guard::pages::panel::sitekey::add::add_sitekey - Rust

Function guard::pages::panel::sitekey::add::add_sitekey[][src]

pub async fn add_sitekey() -> impl Responder
+ Change settings

Function guard::pages::panel::sitekey::add::add_sitekey[][src]

pub async fn add_sitekey() -> impl Responder
\ No newline at end of file diff --git a/guard/pages/panel/sitekey/add/index.html b/guard/pages/panel/sitekey/add/index.html index c6a3a1d1..dd61d96a 100644 --- a/guard/pages/panel/sitekey/add/index.html +++ b/guard/pages/panel/sitekey/add/index.html @@ -1,7 +1,7 @@ guard::pages::panel::sitekey::add - Rust

Module guard::pages::panel::sitekey::add[][src]

Structs

+ Change settings

Module guard::pages::panel::sitekey::add[][src]

Structs

IndexPage

Constants

COMPONENT

Functions

add_sitekey
diff --git a/guard/pages/panel/sitekey/add/struct.IndexPage.html b/guard/pages/panel/sitekey/add/struct.IndexPage.html index ddd725cc..8015971b 100644 --- a/guard/pages/panel/sitekey/add/struct.IndexPage.html +++ b/guard/pages/panel/sitekey/add/struct.IndexPage.html @@ -1,16 +1,17 @@ guard::pages::panel::sitekey::add::IndexPage - Rust -

Struct guard::pages::panel::sitekey::add::IndexPage[][src]

pub struct IndexPage<'a> {
+

Struct guard::pages::panel::sitekey::add::IndexPage[][src]

pub struct IndexPage<'a> {
     pub name: &'a str,
     pub title: &'a str,
     pub levels: usize,
     pub form_title: &'a str,
     pub form_description: &'a str,
+    pub form_duration: usize,
 }

- Fields

name: &'a strtitle: &'a strlevels: usizeform_title: &'a strform_description: &'a str

Trait Implementations

impl<'a> Clone for IndexPage<'a>[src]

 /*
 * Copyright (C) 2021  Aravinth Manivannan <realaravinth@batsense.net>
@@ -152,7 +158,7 @@
     impl Docs {
         pub const fn new() -> Self {
             Docs {
-                home: "/docs",
+                home: "/docs/",
                 spec: "/docs/openapi.json",
                 assets: "/docs/{_:.*}",
             }
@@ -210,23 +216,29 @@
     use crate::*;
 
     #[actix_rt::test]
-    async fn docs_work() {
-        const INDEX: &str = "/docs";
-        const FILE: &str = "/docs/favicon-32x32.png";
-        const SPEC: &str = "/docs/openapi.json";
+    async fn docs_works() {
+        const FILE: &str = "favicon-32x32.png";
 
         let mut app = test::init_service(App::new().configure(services)).await;
 
-        let resp =
-            test::call_service(&mut app, test::TestRequest::get().uri(INDEX).to_request()).await;
+        let resp = test::call_service(
+            &mut app,
+            test::TestRequest::get().uri(DOCS.home).to_request(),
+        )
+        .await;
         assert_eq!(resp.status(), StatusCode::OK);
 
-        let resp =
-            test::call_service(&mut app, test::TestRequest::get().uri(FILE).to_request()).await;
+        let resp = test::call_service(
+            &mut app,
+            test::TestRequest::get().uri(DOCS.spec).to_request(),
+        )
+        .await;
         assert_eq!(resp.status(), StatusCode::OK);
 
+        let uri = format!("{}{}", DOCS.home, FILE);
+
         let resp =
-            test::call_service(&mut app, test::TestRequest::get().uri(SPEC).to_request()).await;
+            test::call_service(&mut app, test::TestRequest::get().uri(&uri).to_request()).await;
         assert_eq!(resp.status(), StatusCode::OK);
     }
 }
diff --git a/src/guard/pages/panel/sitekey/add.rs.html b/src/guard/pages/panel/sitekey/add.rs.html
index f57c765f..d66a40e0 100644
--- a/src/guard/pages/panel/sitekey/add.rs.html
+++ b/src/guard/pages/panel/sitekey/add.rs.html
@@ -53,6 +53,8 @@
 50
 51
 52
+53
+54
 
 /*
 * Copyright (C) 2021  Aravinth Manivannan <realaravinth@batsense.net>
@@ -84,6 +86,7 @@
     pub levels: usize,
     pub form_title: &'a str,
     pub form_description: &'a str,
+    pub form_duration: usize,
 }
 
 const COMPONENT: &str = "Add Site Key";
@@ -96,6 +99,7 @@
             levels: 1,
             form_description: "",
             form_title: "Add Site Key",
+            form_duration: 30,
         }
     }
 }