LyricTian / gin-admin

A lightweight, flexible, elegant and full-featured RBAC scaffolding based on GIN + GORM 2.0 + Casbin 2.0 + Wire DI.
http://101.42.232.163:8040
Apache License 2.0
2.51k stars 508 forks source link

移动前端api 怎么实现 #155

Open Mu-tou opened 2 months ago

Mu-tou commented 2 months ago

现有的生成的模块 都生成在mods下,前端生成后 , 走得中间件 和解析的userid. 不是 前端用户的数据 怎么能更好的处理?

gopkg-dev commented 2 months ago

应该也是一样写,在 auth 和 casbin 中间件里面SkippedPathPrefixes配置跳过你 api 的路由就好了, 如果有需要你再自己写个中间件来单独处理你移动端的 API 的参数校验之类的