Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 78x 78x 77x | import { ReportReq } from "proto/reporting_pb"; import client from "./client"; export interface ReportInput { reason: string; description: string; contentRef: string; authorUser: string | number; } export function reportContent({ reason, description, contentRef, authorUser, }: ReportInput) { const req = new ReportReq(); req.setReason(reason); req.setDescription(description); req.setContentRef(contentRef); // authorUser can be string or the string representation of a number req.setAuthorUser(authorUser.toString()); req.setUserAgent(navigator.userAgent); req.setPage(window.location.href); return client.reporting.report(req); } |