Options
All
  • Public
  • Public/Protected
  • All
Menu

Report table service.

Hierarchy

  • ReportService

Index

Constructors

constructor

Methods

deleteReport

  • deleteReport(reportID: string): Promise<void>

deleteReportedBook

  • deleteReportedBook(reportID: string): Promise<void>

getBookReports

  • getBookReports(bookID: string): Promise<NBReport[]>

getReport

  • getReport(reportID: string): Promise<NBReport>

getReports

getUserBookReport

  • getUserBookReport(userID: string, bookID: string): Promise<NBReport>

getUserBookReports

  • getUserBookReports(userID: string): Promise<NBReport[]>

getUserReportedBooks

  • getUserReportedBooks(userID: string): Promise<NBBook[]>

reportBook

  • reportBook(userID: string, bookID: string, reason: string): Promise<NBReport>
  • Report a book.

    Parameters

    • userID: string

      The ID of the user reporting the book.

    • bookID: string

      The book's ID.

    • reason: string

      The reason for reporting.

    Returns Promise<NBReport>

    The new book record.

reportExists

  • reportExists(reportID: string): Promise<boolean>

userReportedBook

  • userReportedBook(userID: string, bookID: string): Promise<boolean>
  • Determine whether or not a user has reported a book.

    Parameters

    • userID: string

      The user's ID.

    • bookID: string

      The book's ID.

    Returns Promise<boolean>

    Whether or not the user has reported the book.

userReportedRecently

  • userReportedRecently(userID: string): Promise<boolean>
  • Determine whether or not a user has recently reported a book.

    Parameters

    • userID: string

      The user's ID.

    Returns Promise<boolean>

    Whether or not the user has recently reported a book.

Generated using TypeDoc