mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-15 10:53:09 -06:00
Get seems to be done
This commit is contained in:
parent
00840e35db
commit
3da25ee318
|
|
@ -41,17 +41,21 @@ func GetTag(req *http.Request, userId string, roomId string) util.JSONResponse {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mtag := NewMTag()
|
||||||
|
|
||||||
data, err := accountDB.GetAccountDataByType(
|
data, err := accountDB.GetAccountDataByType(
|
||||||
req.Context(), localpart, "ROOM_ID", "m.tag",
|
req.Context(), localpart, "ROOM_ID", "m.tag",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
json.Unmarshal([]byte(data), &mtag)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return httputil.LogThenError(req, err)
|
return httputil.LogThenError(req, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return util.JSONResponse{
|
return util.JSONResponse{
|
||||||
Code: http.StatusOK,
|
Code: http.StatusOK,
|
||||||
JSON: tags,
|
JSON: mtag,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue