Comments (4)
一般设置为API 版本号,或者随意一个名称吧,因为我这个有静态文件,/这个路由被静态文件暂用了,区分开就可以
from axum_admin.
我重新更新下 模板文件,太久没有更新,模板里面好多都没有
from axum_admin.
// .nest(&CFG.server.api_prefix, apps::api()) 更改为
.merge(apps::api())
另外就是 加api前缀
pub fn api() -> Router {
Router::new()
// 文件上传api
.nest(
&CFG.web.upload_url,
get_service(ServeDir::new(&CFG.web.upload_dir))
.handle_error(|error: std::io::Error| async move { (StatusCode::INTERNAL_SERVER_ERROR, for
at!("Unhandled internal error: {}", error)) }),
)
// 无需授权Api.通用模块
//.nest("/comm", no_auth_api())
.nest("/api/comm", no_auth_api())
// 系统管理模块
// .nest("/system", auth_api())
.nest("/api/system", auth_api())
// 测试模块
//.nest("/test", test_api())
.nest("/api/test", test_api())
}
from axum_admin.
我重新更新了 congfig sample 文件 api_prefix 需要前面加 "/" 像 “/api_v1” 这样的
from axum_admin.
Related Issues (20)
- 安装过程出现数据库写入中文字符错误 HOT 3
- 项目安装完成,登录admin帐号,大部分页面为Page not found error 404 HOT 3
- No item named const_new` found for struct `tokio::sync::OnceCell HOT 1
- 希望添加表结构初始化SQL HOT 1
- How to use casbin_conf? HOT 3
- 预览的账号密码是多少 HOT 2
- no such column: sys_menu.i18n
- Consider adding axum_admin to SeaORM showcase!
- 服务过一段时间访问卡顿 HOT 3
- 数据库连接失败 HOT 9
- 我感觉在 Res::with_err 中分类err进行判断比较好
- axum/poem这2个哪个好用呢
- 加密解密怎么不用openssl
- 请教一下,cargo run 后报 配置文件不存在(config/config.toml)
- 验证码不符合规范
- 我用工具请求 我写的一个 接口 测试一下, 怎么没有参数值啊,或者,难度json 格式参数不对吗?
- sqlite 数据库报错 HOT 1
- cargo run运行异常 HOT 5
- 项目写得好棒,请问能明确一下协议吗
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from axum_admin.