feat: migrate pages mod to use actix_auth_middleware

This commit is contained in:
realaravinth
2022-05-07 12:29:02 +05:30
parent abe494b6e5
commit b057e48d72
12 changed files with 60 additions and 13 deletions

View File

@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
use actix_auth_middleware::Authentication;
use actix_web::web::ServiceConfig;
mod auth;
@@ -31,6 +31,10 @@ pub fn services(cfg: &mut ServiceConfig) {
cfg.service(sitemap::sitemap);
}
pub fn get_middleware() -> Authentication<routes::Routes> {
Authentication::with_identity(routes::ROUTES)
}
#[cfg(not(tarpaulin_include))]
#[cfg(test)]
mod tests {