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

@@ -39,6 +39,10 @@ func Start(conf common.Conf, db *sql.DB) *gin.Engine {
gv1.GET("/friends", Method(v1.FriendsGET, db, common.PrivilegeReadConfidential))
gv1.GET("/friends/with/:id", Method(v1.FriendsWithGET, db, common.PrivilegeReadConfidential))
// Write privilege required
gv1.POST("/friends/add", Method(v1.FriendsAddPOST, db, common.PrivilegeWrite))
gv1.GET("/friends/add/:id", Method(v1.FriendsAddGET, db, common.PrivilegeWrite))
// M E T A
// E T "wow thats so meta"
// T E -- the one who said "wow that's so meta"