Skip to content

Commit

Permalink
[merge] pull request #20 from akrck02/dev
Browse files Browse the repository at this point in the history
Fixed GetProject method, project model requested is now a pointer
  • Loading branch information
akrck02 authored May 23, 2024
2 parents c1830bc + db72170 commit 69360f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions services/permission/permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@ func CanEditUser(author *models.User, user *models.User) bool {
func CanSeeUser(author *models.User, user *models.User) bool {
return author.Email == user.Email
}

//Projects

// func CanEditProject(author *models.Project, user *models.Project) bool {

// return author.Email == user.Email
// }

// func CanSeeProject(author *models.Project, user *models.Project) bool {
// return author.Email == user.Email
// }
2 changes: 1 addition & 1 deletion services/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func DeleteProject(conn context.Context, client *mongo.Client, project *models.P
// [param] project | models.Project : The project to get
//
// [return] *models.Error : The error
func GetProject(conn context.Context, client *mongo.Client, project models.Project) (*models.Project, *models.Error) { // get project from database
func GetProject(conn context.Context, client *mongo.Client, project *models.Project) (*models.Project, *models.Error) { // get project from database

projects := client.Database(database.CurrentDatabase).Collection(database.PROJECT)

Expand Down

0 comments on commit 69360f7

Please sign in to comment.