Ability to add friends. Also, made a few helper functions.

This commit is contained in:
Howl
2016-04-08 19:05:54 +02:00
parent 7b82c98352
commit 44d12d2493
7 changed files with 116 additions and 26 deletions

View File

@@ -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
}