Ability to add friends. Also, made a few helper functions.
This commit is contained in:
@@ -13,3 +13,13 @@ type MethodData struct {
|
||||
RequestData []byte
|
||||
C *gin.Context
|
||||
}
|
||||
|
||||
// Err logs an error into gin.
|
||||
func (md MethodData) Err(err error) {
|
||||
md.C.Error(err)
|
||||
}
|
||||
|
||||
// ID retrieves the Token's owner user ID.
|
||||
func (md MethodData) ID() int {
|
||||
return md.User.UserID
|
||||
}
|
||||
|
Reference in New Issue
Block a user