optimize web interface defile in mirc

pull/249/head
Michael Li 1 year ago
parent 842fabe85d
commit 77c768fa12
No known key found for this signature in database

@ -6,7 +6,7 @@
"type": "go",
"request": "launch",
"mode": "exec",
"program": "${fileDirname}/__debug_bin",
"program": "${workspaceFolder}/.vscode/__debug_bin",
"preLaunchTask": "go: build (debug)",
"cwd": "${workspaceFolder}"
}

@ -35,8 +35,8 @@ type LoginResp struct {
}
type User struct {
Chain Chain `mir:"-"`
Group Group `mir:"m/v1"`
Chain `mir:"-"`
Group `mir:"m/v1"`
Login func(Post, LoginReq) LoginResp `mir:"/user/login/"`
Logout func(Post) `mir:"/user/logout/"`
}

@ -35,8 +35,8 @@ type LoginResp struct {
}
type User struct {
Chain Chain `mir:"-"`
Group Group `mir:"r/v1"`
Chain `mir:"-"`
Group `mir:"r/v1"`
Login func(Post, LoginReq) LoginResp `mir:"/user/login/"`
Logout func(Post) `mir:"/user/logout/"`
}

@ -35,7 +35,7 @@ type LoginResp struct {
}
type User struct {
Group Group `mir:"s/v1"`
Group `mir:"s/v1"`
Index func(Get) `mir:"/index/"`
Login func(Post, LoginReq) LoginResp `mir:"/user/login/"`
Logout func(Post) `mir:"/user/logout/"`

@ -35,8 +35,8 @@ type LoginResp struct {
}
type User struct {
Chain Chain `mir:"-"`
Group Group `mir:"x/v1"`
Chain `mir:"-"`
Group `mir:"x/v1"`
Login func(Post, LoginReq) LoginResp `mir:"/user/login/"`
Logout func(Post) `mir:"/user/logout/"`
}

@ -12,8 +12,8 @@ func init() {
// Admin 运维相关服务
type Admin struct {
Chain Chain `mir:"-"`
Group Group `mir:"v1"`
Chain `mir:"-"`
Group `mir:"v1"`
// ChangeUserStatus 管理·禁言/解封用户
ChangeUserStatus func(Post, web.ChangeUserStatusReq) `mir:"/admin/user/status"`

@ -12,7 +12,7 @@ func init() {
// AlipayPub 支付宝相关不用授权的服务
type AlipayPub struct {
Group Group `mir:"v1"`
Group `mir:"v1"`
// AlipayNotify 支付宝回调
AlipayNotify func(Post, web.AlipayNotifyReq) `mir:"/alipay/notify"`

@ -12,8 +12,8 @@ func init() {
// Core 核心服务,需要授权访问
type Core struct {
Chain Chain `mir:"-"`
Group Group `mir:"v1"`
Chain `mir:"-"`
Group `mir:"v1"`
// SyncSearchIndex 同步索引
SyncSearchIndex func(Get, web.SyncSearchIndexReq) `mir:"/sync/index"`

@ -12,8 +12,8 @@ func init() {
// Followship 关注者模式 服务
type Followship struct {
Chain Chain `mir:"-"`
Group Group `mir:"v1"`
Chain `mir:"-"`
Group `mir:"v1"`
// AddFollowing 添加关注
AddFollowing func(Post, web.AddFollowingReq) `mir:"/following/add"`

@ -12,8 +12,8 @@ func init() {
// Friendship 好友模式 服务
type Friendship struct {
Chain Chain `mir:"-"`
Group Group `mir:"v1"`
Chain `mir:"-"`
Group `mir:"v1"`
// RequestingFriend 请求添加朋友
RequestingFriend func(Post, web.RequestingFriendReq) `mir:"/friend/requesting"`

@ -12,8 +12,8 @@ func init() {
// Loose 宽松授权的服务
type Loose struct {
Chain Chain `mir:"-"`
Group Group `mir:"v1"`
Chain `mir:"-"`
Group `mir:"v1"`
// Timeline 获取广场流
Timeline func(Get, web.TimelineReq) web.TimelineResp `mir:"/posts"`

@ -12,8 +12,8 @@ func init() {
// Priv 私有授权的服务
type Priv struct {
Chain Chain `mir:"-"`
Group Group `mir:"v1"`
Chain `mir:"-"`
Group `mir:"v1"`
// UploadAttachment 上传资源
UploadAttachment func(Post, web.UploadAttachmentReq) web.UploadAttachmentResp `mir:"/attachment"`

@ -12,7 +12,7 @@ func init() {
// Pub 不用授权的公开服务
type Pub struct {
Group Group `mir:"v1"`
Group `mir:"v1"`
// Version 获取后台版本信息
Version func(Get) web.VersionResp `mir:"/"`

Loading…
Cancel
Save