private

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteComment

func DeleteComment(
	ctx *gin.Context,
	DB db.Database,
	userID string,
	off *controllers.Offering,
)

DeleteComment deletes a comment made by the given user

It deletes not only the comment associated with the offering, but also the replica in user comments

func GetComment

func GetComment(ctx *gin.Context, DB db.Database, userID string, off *controllers.Offering)

GetComment retrieves the comment associated with an offering made by a given user

func GetCommentRating

func GetCommentRating(
	ctx *gin.Context,
	DB db.Database,
	userID string,
	comment *controllers.CommentRating,
)

GetCommentRating retrieves the rating made for a comment by a given user

func GetSubjectGrade

func GetSubjectGrade(ctx *gin.Context, DB db.Database, userID string, sub *controllers.Subject)

GetSubjectGrade retrieves the grade a user has in the given subject

GetSubjectGrade is the model implementation for /server/controller/private/user.GetSubjectGrade

func GetSubjectReview

func GetSubjectReview(ctx *gin.Context, DB db.Database, userID string, sub *controllers.Subject)

GetSubjectReview retrieves the review made for a subject by an user

GetSubjectReview is the model implementation for /server/controller/private/user.GetSubjectReview

func GetSubjectVerification added in v1.6.0

func GetSubjectVerification(ctx *gin.Context, DB db.Database, userID string, sub *controllers.Subject)

GetSubjectVerification retrieves the verification status of a subject for a user

GetSubjectVerification is the model implementation for /server/controller/private/user.GetSubjectVerification

func PublishComment

func PublishComment(
	ctx *gin.Context,
	DB db.Database,
	userID string,
	off *controllers.Offering,
	comment *controllers.Comment,
)

PublishComment publishes a comment and its associated reaction made by a given user

func RateComment

func RateComment(
	ctx *gin.Context,
	DB db.Database,
	userID string,
	comment *controllers.CommentRating,
	body *controllers.CommentRateBody,
)

RateComment takes a user's rating and applies it to a given comment

func ReportComment

func ReportComment(
	ctx *gin.Context,
	DB db.Database,
	userID string,
	comment *controllers.CommentRating,
	body *controllers.CommentReportBody,
)

ReportComment takes a user's report and applies it to a given comment

func UpdateSubjectReview

func UpdateSubjectReview(ctx *gin.Context, DB db.Database, userID string, review *controllers.SubjectReview)

UpdateSubjectReview updates the review made for a subject given by an user

UpdateSubjectReview is the model implementation for /server/controller/private/user.UpdateSubjectReview

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL