diff --git a/conf/constants.go b/conf/constants.go
index a9de25c..8f04c2d 100644
--- a/conf/constants.go
+++ b/conf/constants.go
@@ -58,3 +58,14 @@ const (
StatusMemoryLimitExceeded = "MLE"
StatusPartial = "PTL"
)
+
+var ValidPaths = []string{"username", "fullname", "handle.codechef", "handle.codeforces", "handle.hackerearth", "handle.hackerrank", "handle.spoj"}
+
+func IsPathValid(s string) bool {
+ for _, path := range ValidPaths {
+ if path == s {
+ return true
+ }
+ }
+ return false
+}
diff --git a/controllers/search.go b/controllers/search.go
index ddba216..62c51e5 100644
--- a/controllers/search.go
+++ b/controllers/search.go
@@ -1,12 +1,14 @@
package controllers
import (
- "github.com/getsentry/sentry-go"
- . "github.com/mdg-iitr/Codephile/errors"
- "github.com/mdg-iitr/Codephile/models"
"log"
"net/http"
"strconv"
+
+ "github.com/getsentry/sentry-go"
+ . "github.com/mdg-iitr/Codephile/conf"
+ . "github.com/mdg-iitr/Codephile/errors"
+ "github.com/mdg-iitr/Codephile/models"
)
// @Title Search
@@ -14,6 +16,7 @@ import (
// @Security token_auth read:user
// @Param count query string false "No of search objects to be returned"
// @Param query query string true "Search query"
+// @Param path query string false "Field to search in"
// @Success 200 {object} []types.SearchDoc
// @Failure 400 "search query too small"
// @Failure 500 server_error
@@ -32,7 +35,12 @@ func (u *UserController) Search() {
if err != nil {
c = 500
}
- results, err := models.SearchUser(query, c)
+ path := u.GetString("path")
+ //Checking for possible fields, default is "username"
+ if !IsPathValid(path) {
+ path = "username"
+ }
+ results, err := models.SearchUser(query, c, path)
if err != nil {
hub := sentry.GetHubFromContext(u.Ctx.Request.Context())
hub.CaptureException(err)
diff --git a/models/user.go b/models/user.go
index a9e8a38..819ca60 100644
--- a/models/user.go
+++ b/models/user.go
@@ -400,7 +400,7 @@ func UidExists(uid bson.ObjectId) (bool, error) {
return false, nil
}
-//checks if the user is verified, returns error if user doesn't exists
+// checks if the user is verified, returns error if user doesn't exists
func IsUserVerified(uid bson.ObjectId) (bool, error, string) {
sess := db.NewUserCollectionSession()
defer sess.Close()
@@ -453,20 +453,16 @@ func PasswordResetEmail(email string, hostName string, ctx context.Context) bool
return true
}
-func SearchUser(query string, c int) ([]types.SearchDoc, error) {
+func SearchUser(query string, c int, path string) ([]types.SearchDoc, error) {
sess := db.NewUserCollectionSession()
defer sess.Close()
search := bson.M{
"$search": bson.M{
- "index": "name_search",
- "text": bson.M{
+ "index": "names",
+ "autocomplete": bson.M{
"query": query,
- "path": bson.M{"wildcard": "*"},
- "fuzzy": bson.M{
- "maxEdits": 2,
- "maxExpansions": 50,
- },
+ "path": path,
},
},
}
diff --git a/swagger/swagger.json b/swagger/swagger.json
index 9545635..fd9fdbb 100644
--- a/swagger/swagger.json
+++ b/swagger/swagger.json
@@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"title": "Codephile Official API",
- "description": "Documentation for Codephile API",
+ "description": "Documentation for Codephile API\n",
"version": "1.0.0",
"contact": {
"email": "mdg@iitr.ac.in"
@@ -16,7 +16,7 @@
"tags": [
"contests"
],
- "description": "displays all contests",
+ "description": "displays all contests\n\u003cbr\u003e",
"operationId": "ContestController.GetContests",
"responses": {
"200": {
@@ -43,7 +43,7 @@
"tags": [
"contests"
],
- "description": "Returns the contests of a specific website",
+ "description": "Returns the contests of a specific website\n\u003cbr\u003e",
"operationId": "ContestController.Get Particular Site's Contests",
"parameters": [
{
@@ -82,7 +82,7 @@
"tags": [
"feed"
],
- "description": "Provides Data for contests in the Feed",
+ "description": "Provides Data for contests in the Feed\n\u003cbr\u003e",
"operationId": "FeedController.ContestsFeed",
"responses": {
"200": {
@@ -109,7 +109,7 @@
"tags": [
"feed"
],
- "description": "Gives submission feed in paginated manner giving 100 submissions at a time",
+ "description": "Gives submission feed in paginated manner giving 100 submissions at a time\n\u003cbr\u003e",
"operationId": "FeedController.FriendFeed",
"parameters": [
{
@@ -151,7 +151,7 @@
"tags": [
"feed"
],
- "description": "Gives all submission feed of the user",
+ "description": "Gives all submission feed of the user\n\u003cbr\u003e",
"operationId": "FeedController.All Feed",
"responses": {
"200": {
@@ -181,7 +181,7 @@
"tags": [
"friends"
],
- "description": "Compares the data of two users",
+ "description": "Compares the data of two users\n\u003cbr\u003e",
"operationId": "FriendsController.CompareUser",
"parameters": [
{
@@ -220,7 +220,7 @@
"tags": [
"friends"
],
- "description": "Adds the Following user's uid to the database",
+ "description": "Adds the Following user's uid to the database\n\u003cbr\u003e",
"operationId": "FriendsController.FollowUser",
"parameters": [
{
@@ -256,7 +256,7 @@
"tags": [
"friends"
],
- "description": "Fetches the users the user is following",
+ "description": "Fetches the users the user is following\n\u003cbr\u003e",
"operationId": "FriendsController.GetFollowing",
"responses": {
"200": {
@@ -286,7 +286,7 @@
"tags": [
"friends"
],
- "description": "Un-follows the user with the given uid",
+ "description": "Un-follows the user with the given uid\n\u003cbr\u003e",
"operationId": "FriendsController.Un-follow User",
"parameters": [
{
@@ -322,7 +322,7 @@
"tags": [
"graph"
],
- "description": "Gives the activity graph for a user with given uid, (Logged-in user if uid is empty)",
+ "description": "Gives the activity graph for a user with given uid, (Logged-in user if uid is empty)\n\u003cbr\u003e",
"operationId": "GraphController.Activity Graph",
"parameters": [
{
@@ -366,7 +366,7 @@
"tags": [
"graph"
],
- "description": "Gives the count of the various different submissions of the user with a uid (Logged-in user if uid is empty)",
+ "description": "Gives the count of the various different submissions of the user with a uid (Logged-in user if uid is empty)\n\u003cbr\u003e",
"operationId": "GraphController.Submissions Status",
"parameters": [
{
@@ -410,7 +410,7 @@
"tags": [
"submission"
],
- "description": "Get all submissions of a user(logged-in if uid is empty) across various platforms",
+ "description": "Get all submissions of a user(logged-in if uid is empty) across various platforms\n\u003cbr\u003e",
"operationId": "SubmissionController.All submissions",
"parameters": [
{
@@ -451,7 +451,7 @@
"tags": [
"submission"
],
- "description": "Triggers saving of user's submissions across a particular platform into database",
+ "description": "Triggers saving of user's submissions across a particular platform into database\n\u003cbr\u003e",
"operationId": "SubmissionController.Post",
"parameters": [
{
@@ -487,7 +487,7 @@
"tags": [
"submission"
],
- "description": "Filter submissions of user on the basis of status, site and tags",
+ "description": "Filter submissions of user on the basis of status, site and tags\n\u003cbr\u003e",
"operationId": "SubmissionController.Filter",
"parameters": [
{
@@ -544,7 +544,7 @@
"tags": [
"submission"
],
- "description": "Get paginated submissions(100 per page) of user(logged-in if uid is empty) across various platforms",
+ "description": "Get paginated submissions(100 per page) of user(logged-in if uid is empty) across various platforms\n\u003cbr\u003e",
"operationId": "SubmissionController.Get Submissions",
"parameters": [
{
@@ -592,7 +592,7 @@
"tags": [
"user"
],
- "description": "update the logged in user",
+ "description": "update the logged in user\n\u003cbr\u003e",
"operationId": "UserController.Update",
"parameters": [
{
@@ -636,6 +636,12 @@
"name": "handle.spoj",
"description": "New Spoj Handle",
"type": "string"
+ },
+ {
+ "in": "formData",
+ "name": "handle.leetcode",
+ "description": "New Leetcode Handle",
+ "type": "string"
}
],
"responses": {
@@ -675,7 +681,7 @@
"tags": [
"user"
],
- "description": "get all Users",
+ "description": "get all Users\n\u003cbr\u003e",
"operationId": "UserController.GetAll",
"responses": {
"200": {
@@ -705,13 +711,20 @@
"tags": [
"user"
],
- "description": "checks if username is available",
- "operationId": "UserController.username available",
+ "description": "checks if email/username is available(email given pref, in case both params are present)\n\u003cbr\u003e",
+ "operationId": "UserController.Email/Username available",
"parameters": [
+ {
+ "in": "query",
+ "name": "email",
+ "description": "E-mail ID",
+ "required": true,
+ "type": "string"
+ },
{
"in": "query",
"name": "username",
- "description": "Username",
+ "description": "username",
"required": true,
"type": "string"
}
@@ -741,7 +754,7 @@
"tags": [
"user"
],
- "description": "Fetches user info from different websites and store them into the database",
+ "description": "Fetches user info from different websites and store them into the database\n\u003cbr\u003e",
"operationId": "UserController.Fetch User Info",
"parameters": [
{
@@ -780,7 +793,7 @@
"tags": [
"user"
],
- "description": "Returns info of user(logged in user if uid is empty) from different websites",
+ "description": "Returns info of user(logged in user if uid is empty) from different websites\n\u003cbr\u003e",
"operationId": "UserController.Fetch All User Profiles And returns them",
"parameters": [
{
@@ -821,7 +834,7 @@
"tags": [
"user"
],
- "description": "Filter users on basis of institute name",
+ "description": "Filter users on basis of institute name\n\u003cbr\u003e",
"operationId": "UserController.Filter",
"parameters": [
{
@@ -863,7 +876,7 @@
"tags": [
"user"
],
- "description": "Logs user into the system",
+ "description": "Logs user into the system\n\u003cbr\u003e",
"operationId": "UserController.Login",
"parameters": [
{
@@ -899,7 +912,7 @@
"tags": [
"user"
],
- "description": "Logs out current logged in user session",
+ "description": "Logs out current logged in user session\n\u003cbr\u003e",
"operationId": "UserController.logout",
"responses": {
"200": {
@@ -926,7 +939,7 @@
"tags": [
"user"
],
- "description": "Changes password of the user",
+ "description": "Changes password of the user\n\u003cbr\u003e",
"operationId": "UserController.Password Change",
"parameters": [
{
@@ -970,7 +983,7 @@
"tags": [
"user"
],
- "description": "Sends an email to the user to reset the password",
+ "description": "Sends an email to the user to reset the password\n\u003cbr\u003e",
"operationId": "UserController.Password-Reset-Email",
"parameters": [
{
@@ -996,7 +1009,7 @@
"tags": [
"user"
],
- "description": "Resets the password of the user",
+ "description": "Resets the password of the user\n\u003cbr\u003e",
"operationId": "UserController.Password-Reset-Form",
"responses": {
"200": {
@@ -1013,7 +1026,7 @@
"tags": [
"user"
],
- "description": "update the profile picture of logged in user",
+ "description": "update the profile picture of logged in user\n\u003cbr\u003e",
"operationId": "UserController.Update Profile Pic",
"parameters": [
{
@@ -1049,7 +1062,7 @@
"tags": [
"user"
],
- "description": "Endpoint to search users",
+ "description": "Endpoint to search users\n\u003cbr\u003e",
"operationId": "UserController.Search",
"parameters": [
{
@@ -1064,6 +1077,12 @@
"description": "Search query",
"required": true,
"type": "string"
+ },
+ {
+ "in": "query",
+ "name": "path",
+ "description": "Field to search in",
+ "type": "string"
}
],
"responses": {
@@ -1104,7 +1123,7 @@
"tags": [
"user"
],
- "description": "create users",
+ "description": "create users\n\u003cbr\u003e",
"operationId": "UserController.CreateUser",
"parameters": [
{
@@ -1164,6 +1183,12 @@
"name": "handle.spoj",
"description": "Spoj Handle",
"type": "string"
+ },
+ {
+ "in": "formData",
+ "name": "handle.leetcode",
+ "description": "Leetcode Handle",
+ "type": "string"
}
],
"responses": {
@@ -1187,7 +1212,7 @@
"tags": [
"user"
],
- "description": "verify user handles across different websites",
+ "description": "verify user handles across different websites\n\u003cbr\u003e",
"operationId": "UserController.Verify site handles",
"parameters": [
{
@@ -1230,7 +1255,7 @@
"tags": [
"user"
],
- "description": "Get user by uid. Returns logged in user if uid is empty",
+ "description": "Get user by uid. Returns logged in user if uid is empty\n\u003cbr\u003e",
"operationId": "UserController.Get",
"parameters": [
{
@@ -1273,7 +1298,7 @@
"definitions": {
"bson.ObjectId": {
"title": "ObjectId",
- "type": "object"
+ "type": "string"
},
"types.ActivityGraph": {
"title": "ActivityGraph",
@@ -1295,6 +1320,9 @@
"hackerrankProfile": {
"$ref": "#/definitions/types.ProfileInfo"
},
+ "leetcodeProfile": {
+ "$ref": "#/definitions/types.ProfileInfo"
+ },
"spojProfile": {
"$ref": "#/definitions/types.ProfileInfo"
}
@@ -1390,6 +1418,9 @@
"hackerrank": {
"type": "string"
},
+ "leetcode": {
+ "type": "string"
+ },
"spoj": {
"type": "string"
}
@@ -1411,6 +1442,10 @@
"type": "string",
"format": "datetime"
},
+ "Leetcode": {
+ "type": "string",
+ "format": "datetime"
+ },
"Spoj": {
"type": "string",
"format": "datetime"
@@ -1520,6 +1555,10 @@
"type": "integer",
"format": "int64"
},
+ "leetcode": {
+ "type": "integer",
+ "format": "int64"
+ },
"spoj": {
"type": "integer",
"format": "int64"
diff --git a/swagger/swagger.yml b/swagger/swagger.yml
index 543cb79..1b2f725 100644
--- a/swagger/swagger.yml
+++ b/swagger/swagger.yml
@@ -1,7 +1,8 @@
swagger: "2.0"
info:
title: Codephile Official API
- description: Documentation for Codephile API
+ description: |
+ Documentation for Codephile API
version: 1.0.0
contact:
email: mdg@iitr.ac.in
@@ -12,7 +13,9 @@ paths:
get:
tags:
- contests
- description: displays all contests
+ description: |-
+ displays all contests
+
operationId: ContestController.GetContests
responses:
"200":
@@ -28,7 +31,9 @@ paths:
get:
tags:
- contests
- description: Returns the contests of a specific website
+ description: |-
+ Returns the contests of a specific website
+
operationId: ContestController.Get Particular Site's Contests
parameters:
- in: path
@@ -52,7 +57,9 @@ paths:
get:
tags:
- feed
- description: Provides Data for contests in the Feed
+ description: |-
+ Provides Data for contests in the Feed
+
operationId: FeedController.ContestsFeed
responses:
"200":
@@ -68,8 +75,9 @@ paths:
get:
tags:
- feed
- description: Gives submission feed in paginated manner giving 100 submissions
- at a time
+ description: |-
+ Gives submission feed in paginated manner giving 100 submissions at a time
+
operationId: FeedController.FriendFeed
parameters:
- in: query
@@ -96,7 +104,9 @@ paths:
get:
tags:
- feed
- description: Gives all submission feed of the user
+ description: |-
+ Gives all submission feed of the user
+
operationId: FeedController.All Feed
responses:
"200":
@@ -114,7 +124,9 @@ paths:
get:
tags:
- friends
- description: Compares the data of two users
+ description: |-
+ Compares the data of two users
+
operationId: FriendsController.CompareUser
parameters:
- in: query
@@ -138,7 +150,9 @@ paths:
post:
tags:
- friends
- description: Adds the Following user's uid to the database
+ description: |-
+ Adds the Following user's uid to the database
+
operationId: FriendsController.FollowUser
parameters:
- in: query
@@ -160,7 +174,9 @@ paths:
get:
tags:
- friends
- description: Fetches the users the user is following
+ description: |-
+ Fetches the users the user is following
+
operationId: FriendsController.GetFollowing
responses:
"200":
@@ -178,7 +194,9 @@ paths:
post:
tags:
- friends
- description: Un-follows the user with the given uid
+ description: |-
+ Un-follows the user with the given uid
+
operationId: FriendsController.Un-follow User
parameters:
- in: query
@@ -200,8 +218,9 @@ paths:
get:
tags:
- graph
- description: Gives the activity graph for a user with given uid, (Logged-in
- user if uid is empty)
+ description: |-
+ Gives the activity graph for a user with given uid, (Logged-in user if uid is empty)
+
operationId: GraphController.Activity Graph
parameters:
- in: path
@@ -228,8 +247,9 @@ paths:
get:
tags:
- graph
- description: Gives the count of the various different submissions of the user
- with a uid (Logged-in user if uid is empty)
+ description: |-
+ Gives the count of the various different submissions of the user with a uid (Logged-in user if uid is empty)
+
operationId: GraphController.Submissions Status
parameters:
- in: path
@@ -256,8 +276,9 @@ paths:
post:
tags:
- submission
- description: Triggers saving of user's submissions across a particular platform
- into database
+ description: |-
+ Triggers saving of user's submissions across a particular platform into database
+
operationId: SubmissionController.Post
parameters:
- in: path
@@ -279,7 +300,9 @@ paths:
get:
tags:
- submission
- description: Filter submissions of user on the basis of status, site and tags
+ description: |-
+ Filter submissions of user on the basis of status, site and tags
+
operationId: SubmissionController.Filter
parameters:
- in: path
@@ -315,8 +338,9 @@ paths:
get:
tags:
- submission
- description: Get paginated submissions(100 per page) of user(logged-in if uid
- is empty) across various platforms
+ description: |-
+ Get paginated submissions(100 per page) of user(logged-in if uid is empty) across various platforms
+
operationId: SubmissionController.Get Submissions
parameters:
- in: path
@@ -347,8 +371,9 @@ paths:
get:
tags:
- submission
- description: Get all submissions of a user(logged-in if uid is empty) across
- various platforms
+ description: |-
+ Get all submissions of a user(logged-in if uid is empty) across various platforms
+
operationId: SubmissionController.All submissions
parameters:
- in: path
@@ -373,7 +398,9 @@ paths:
put:
tags:
- user
- description: update the logged in user
+ description: |-
+ update the logged in user
+
operationId: UserController.Update
parameters:
- in: formData
@@ -404,6 +431,10 @@ paths:
name: handle.spoj
description: New Spoj Handle
type: string
+ - in: formData
+ name: handle.leetcode
+ description: New Leetcode Handle
+ type: string
responses:
"202":
description: ""
@@ -426,7 +457,9 @@ paths:
get:
tags:
- user
- description: Get user by uid. Returns logged in user if uid is empty
+ description: |-
+ Get user by uid. Returns logged in user if uid is empty
+
operationId: UserController.Get
parameters:
- in: path
@@ -453,7 +486,9 @@ paths:
get:
tags:
- user
- description: get all Users
+ description: |-
+ get all Users
+
operationId: UserController.GetAll
responses:
"200":
@@ -471,12 +506,19 @@ paths:
get:
tags:
- user
- description: checks if username is available
- operationId: UserController.username available
+ description: |-
+ checks if email/username is available(email given pref, in case both params are present)
+
+ operationId: UserController.Email/Username available
parameters:
+ - in: query
+ name: email
+ description: E-mail ID
+ required: true
+ type: string
- in: query
name: username
- description: Username
+ description: username
required: true
type: string
responses:
@@ -494,8 +536,9 @@ paths:
post:
tags:
- user
- description: Fetches user info from different websites and store them into the
- database
+ description: |-
+ Fetches user info from different websites and store them into the database
+
operationId: UserController.Fetch User Info
parameters:
- in: path
@@ -519,8 +562,9 @@ paths:
get:
tags:
- user
- description: Returns info of user(logged in user if uid is empty) from different
- websites
+ description: |-
+ Returns info of user(logged in user if uid is empty) from different websites
+
operationId: UserController.Fetch All User Profiles And returns them
parameters:
- in: path
@@ -545,7 +589,9 @@ paths:
get:
tags:
- user
- description: Filter users on basis of institute name
+ description: |-
+ Filter users on basis of institute name
+
operationId: UserController.Filter
parameters:
- in: query
@@ -571,7 +617,9 @@ paths:
post:
tags:
- user
- description: Logs user into the system
+ description: |-
+ Logs user into the system
+
operationId: UserController.Login
parameters:
- in: formData
@@ -595,7 +643,9 @@ paths:
post:
tags:
- user
- description: Logs out current logged in user session
+ description: |-
+ Logs out current logged in user session
+
operationId: UserController.logout
responses:
"200":
@@ -611,7 +661,9 @@ paths:
post:
tags:
- user
- description: Changes password of the user
+ description: |-
+ Changes password of the user
+
operationId: UserController.Password Change
parameters:
- in: body
@@ -638,7 +690,9 @@ paths:
post:
tags:
- user
- description: Sends an email to the user to reset the password
+ description: |-
+ Sends an email to the user to reset the password
+
operationId: UserController.Password-Reset-Email
parameters:
- in: formData
@@ -655,7 +709,9 @@ paths:
post:
tags:
- user
- description: Resets the password of the user
+ description: |-
+ Resets the password of the user
+
operationId: UserController.Password-Reset-Form
responses:
"200":
@@ -666,7 +722,9 @@ paths:
put:
tags:
- user
- description: update the profile picture of logged in user
+ description: |-
+ update the profile picture of logged in user
+
operationId: UserController.Update Profile Pic
parameters:
- in: formData
@@ -688,7 +746,9 @@ paths:
get:
tags:
- user
- description: Endpoint to search users
+ description: |-
+ Endpoint to search users
+
operationId: UserController.Search
parameters:
- in: query
@@ -700,6 +760,10 @@ paths:
description: Search query
required: true
type: string
+ - in: query
+ name: path
+ description: Field to search in
+ type: string
responses:
"200":
description: ""
@@ -722,7 +786,9 @@ paths:
post:
tags:
- user
- description: create users
+ description: |-
+ create users
+
operationId: UserController.CreateUser
parameters:
- in: formData
@@ -765,6 +831,10 @@ paths:
name: handle.spoj
description: Spoj Handle
type: string
+ - in: formData
+ name: handle.leetcode
+ description: Leetcode Handle
+ type: string
responses:
"201":
description: '{int} types.User.Id'
@@ -778,7 +848,9 @@ paths:
get:
tags:
- user
- description: verify user handles across different websites
+ description: |-
+ verify user handles across different websites
+
operationId: UserController.Verify site handles
parameters:
- in: path
@@ -804,7 +876,7 @@ paths:
definitions:
bson.ObjectId:
title: ObjectId
- type: object
+ type: string
types.ActivityGraph:
title: ActivityGraph
type: array
@@ -820,6 +892,8 @@ definitions:
$ref: '#/definitions/types.ProfileInfo'
hackerrankProfile:
$ref: '#/definitions/types.ProfileInfo'
+ leetcodeProfile:
+ $ref: '#/definitions/types.ProfileInfo'
spojProfile:
$ref: '#/definitions/types.ProfileInfo'
types.AllWorldRanks:
@@ -884,6 +958,8 @@ definitions:
type: string
hackerrank:
type: string
+ leetcode:
+ type: string
spoj:
type: string
types.LastFetchedSubmission:
@@ -899,6 +975,9 @@ definitions:
Hackerrank:
type: string
format: datetime
+ Leetcode:
+ type: string
+ format: datetime
Spoj:
type: string
format: datetime
@@ -973,6 +1052,9 @@ definitions:
hackerrank:
type: integer
format: int64
+ leetcode:
+ type: integer
+ format: int64
spoj:
type: integer
format: int64
diff --git a/tests/default_test.go b/tests/default_test.go
index c3b84d2..95559a3 100644
--- a/tests/default_test.go
+++ b/tests/default_test.go
@@ -5,16 +5,18 @@ import (
"github.com/mdg-iitr/Codephile/conf"
"github.com/mdg-iitr/Codephile/models/db"
+ "net/http"
+ "net/http/httptest"
+ "testing"
+
"github.com/astaxie/beego"
_ "github.com/mdg-iitr/Codephile/conf"
"github.com/mdg-iitr/Codephile/models"
+ _ "github.com/mdg-iitr/Codephile/models"
"github.com/mdg-iitr/Codephile/models/types"
_ "github.com/mdg-iitr/Codephile/routers"
"github.com/mdg-iitr/Codephile/services/auth"
. "github.com/smartystreets/goconvey/convey"
- "net/http"
- "net/http/httptest"
- "testing"
)
func init() {