mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-10 16:33:11 -06:00
Apply requested changes
This commit is contained in:
parent
44ab32c298
commit
4731ae9c6d
|
|
@ -27,10 +27,6 @@ import (
|
|||
"github.com/matrix-org/util"
|
||||
)
|
||||
|
||||
type roomID struct {
|
||||
RoomID string `json:"room_id"`
|
||||
}
|
||||
|
||||
// DirectoryRoom looks up a room alias
|
||||
func DirectoryRoom(
|
||||
req *http.Request,
|
||||
|
|
@ -118,7 +114,9 @@ func SetLocalAlias(
|
|||
}
|
||||
}
|
||||
|
||||
var r roomID
|
||||
var r struct {
|
||||
RoomID string `json:"room_id"`
|
||||
}
|
||||
if resErr := httputil.UnmarshalJSONRequest(req, &r); resErr != nil {
|
||||
return *resErr
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ CREATE TABLE IF NOT EXISTS room_aliases (
|
|||
-- Room ID the alias refers to
|
||||
room_id TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS room_id_idx ON room_aliases(room_id);
|
||||
`
|
||||
|
||||
const insertRoomAliasSQL = "" +
|
||||
|
|
|
|||
Loading…
Reference in a new issue