mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-13 11:05:40 +00:00
feat: migrate pages mod to use actix_auth_middleware
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user