Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FinClip
ligase
提交
a7acfa55
ligase
项目概览
FinClip
/
ligase
通知
36
Star
8
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ligase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a7acfa55
编写于
5月 22, 2017
作者:
M
Mark Haines
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix build after #114
上级
e756b3b0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
5 deletion
+5
-5
src/github.com/matrix-org/dendrite/clientapi/routing/routing.go
...thub.com/matrix-org/dendrite/clientapi/routing/routing.go
+2
-2
src/github.com/matrix-org/dendrite/clientapi/writers/register.go
...hub.com/matrix-org/dendrite/clientapi/writers/register.go
+3
-3
未找到文件。
src/github.com/matrix-org/dendrite/clientapi/routing/routing.go
浏览文件 @
a7acfa55
...
...
@@ -19,7 +19,7 @@ import (
"net/http"
"github.com/gorilla/mux"
"github.com/matrix-org/dendrite/clientapi/auth/storage"
"github.com/matrix-org/dendrite/clientapi/auth/storage
/accounts
"
"github.com/matrix-org/dendrite/clientapi/config"
"github.com/matrix-org/dendrite/clientapi/producers"
"github.com/matrix-org/dendrite/clientapi/readers"
...
...
@@ -33,7 +33,7 @@ const pathPrefixR0 = "/_matrix/client/r0"
// Setup registers HTTP handlers with the given ServeMux. It also supplies the given http.Client
// to clients which need to make outbound HTTP requests.
func
Setup
(
servMux
*
http
.
ServeMux
,
httpClient
*
http
.
Client
,
cfg
config
.
ClientAPI
,
producer
*
producers
.
RoomserverProducer
,
queryAPI
api
.
RoomserverQueryAPI
,
accountDB
*
storage
.
Account
Database
)
{
func
Setup
(
servMux
*
http
.
ServeMux
,
httpClient
*
http
.
Client
,
cfg
config
.
ClientAPI
,
producer
*
producers
.
RoomserverProducer
,
queryAPI
api
.
RoomserverQueryAPI
,
accountDB
*
accounts
.
Database
)
{
apiMux
:=
mux
.
NewRouter
()
r0mux
:=
apiMux
.
PathPrefix
(
pathPrefixR0
)
.
Subrouter
()
r0mux
.
Handle
(
"/createRoom"
,
...
...
src/github.com/matrix-org/dendrite/clientapi/writers/register.go
浏览文件 @
a7acfa55
...
...
@@ -5,7 +5,7 @@ import (
"net/http"
log
"github.com/Sirupsen/logrus"
"github.com/matrix-org/dendrite/clientapi/auth/storage"
"github.com/matrix-org/dendrite/clientapi/auth/storage
/accounts
"
"github.com/matrix-org/dendrite/clientapi/auth/types"
"github.com/matrix-org/dendrite/clientapi/httputil"
"github.com/matrix-org/dendrite/clientapi/jsonerror"
...
...
@@ -90,7 +90,7 @@ func (r *registerRequest) Validate() *util.JSONResponse {
}
// Register processes a /register request. http://matrix.org/speculator/spec/HEAD/client_server/unstable.html#post-matrix-client-unstable-register
func
Register
(
req
*
http
.
Request
,
accountDB
*
storage
.
Account
Database
)
util
.
JSONResponse
{
func
Register
(
req
*
http
.
Request
,
accountDB
*
accounts
.
Database
)
util
.
JSONResponse
{
var
r
registerRequest
resErr
:=
httputil
.
UnmarshalJSONRequest
(
req
,
&
r
)
if
resErr
!=
nil
{
...
...
@@ -140,7 +140,7 @@ func Register(req *http.Request, accountDB *storage.AccountDatabase) util.JSONRe
}
}
func
completeRegistration
(
accountDB
*
storage
.
Account
Database
,
username
,
password
string
)
util
.
JSONResponse
{
func
completeRegistration
(
accountDB
*
accounts
.
Database
,
username
,
password
string
)
util
.
JSONResponse
{
acc
,
err
:=
accountDB
.
CreateAccount
(
username
,
password
)
if
err
!=
nil
{
return
util
.
JSONResponse
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录