mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-15 10:53:09 -06:00
added URI extraction and checking
This commit is contained in:
parent
0fa7122d63
commit
24fa42dcae
|
|
@ -19,6 +19,13 @@ type URIToUIDResponse struct {
|
||||||
func URIToUID(req *http.Request, cfg config.Dendrite) util.JSONResponse {
|
func URIToUID(req *http.Request, cfg config.Dendrite) util.JSONResponse {
|
||||||
// TODO: Implement
|
// TODO: Implement
|
||||||
homeserver := cfg.Matrix.ServerName
|
homeserver := cfg.Matrix.ServerName
|
||||||
|
uri := req.URL.Query().Get("uri")
|
||||||
|
if uri == "" {
|
||||||
|
return util.JSONResponse{
|
||||||
|
Code: http.StatusOK,
|
||||||
|
JSON: nil,
|
||||||
|
}
|
||||||
|
}
|
||||||
return util.JSONResponse{
|
return util.JSONResponse{
|
||||||
Code: http.StatusOK,
|
Code: http.StatusOK,
|
||||||
JSON: nil,
|
JSON: nil,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue