diff --git a/web/apps/photos/src/components/pages/sharedAlbum/ReportAbuse.tsx b/web/apps/photos/src/components/pages/sharedAlbum/ReportAbuse.tsx deleted file mode 100644 index ba6b0418f..000000000 --- a/web/apps/photos/src/components/pages/sharedAlbum/ReportAbuse.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { styled } from "@mui/material"; -import { Button } from "react-bootstrap"; -const Container = styled("div")` - position: fixed; - bottom: 7%; - right: 2%; - align-self: flex-end; -`; - -interface Iprops { - onClick: () => void; -} - -export default function ReportAbuse(props: Iprops) { - return ( - - - - ); -} diff --git a/web/apps/photos/src/constants/publicCollection.ts b/web/apps/photos/src/constants/publicCollection.ts deleted file mode 100644 index 5a1faad75..000000000 --- a/web/apps/photos/src/constants/publicCollection.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum REPORT_REASON { - COPYRIGHT = "COPYRIGHT", - MALICIOUS_CONTENT = "MALICIOUS_CONTENT", -} diff --git a/web/apps/photos/src/services/publicCollectionService.ts b/web/apps/photos/src/services/publicCollectionService.ts index 353281f66..580382dc4 100644 --- a/web/apps/photos/src/services/publicCollectionService.ts +++ b/web/apps/photos/src/services/publicCollectionService.ts @@ -4,14 +4,9 @@ import HTTPService from "@ente/shared/network/HTTPService"; import { getEndpoint } from "@ente/shared/network/api"; import { logError } from "@ente/shared/sentry"; import localForage from "@ente/shared/storage/localForage"; -import { REPORT_REASON } from "constants/publicCollection"; import { Collection, CollectionPublicMagicMetadata } from "types/collection"; import { EncryptedEnteFile, EnteFile } from "types/file"; -import { - AbuseReportDetails, - AbuseReportRequest, - LocalSavedPublicCollectionFiles, -} from "types/publicCollection"; +import { LocalSavedPublicCollectionFiles } from "types/publicCollection"; import { decryptFile, mergeMetadata, sortFiles } from "utils/file"; const ENDPOINT = getEndpoint(); @@ -376,30 +371,6 @@ export const verifyPublicCollectionPassword = async ( } }; -export const reportAbuse = async ( - token: string, - url: string, - reason: REPORT_REASON, - details: AbuseReportDetails, -) => { - try { - if (!token) { - return; - } - const abuseReportRequest: AbuseReportRequest = { url, reason, details }; - - await HTTPService.post( - `${ENDPOINT}/public-collection/report-abuse`, - abuseReportRequest, - null, - { "X-Auth-Access-Token": token }, - ); - } catch (e) { - logError(e, "failed to post abuse report"); - throw e; - } -}; - export const removePublicCollectionWithFiles = async ( collectionUID: string, collectionKey: string, diff --git a/web/apps/photos/src/types/publicCollection/index.ts b/web/apps/photos/src/types/publicCollection/index.ts index 7e3203e77..11ee4a2d1 100644 --- a/web/apps/photos/src/types/publicCollection/index.ts +++ b/web/apps/photos/src/types/publicCollection/index.ts @@ -1,5 +1,4 @@ import { TimeStampListItem } from "components/PhotoList"; -import { REPORT_REASON } from "constants/publicCollection"; import { PublicURL } from "types/collection"; import { EnteFile } from "types/file"; @@ -17,31 +16,6 @@ export interface LocalSavedPublicCollectionFiles { files: EnteFile[]; } -export interface AbuseReportRequest { - url: string; - reason: REPORT_REASON; - details: AbuseReportDetails; -} - -export interface AbuseReportDetails { - fullName: string; - email: string; - comment: string; - signature: string; - onBehalfOf: string; - jobTitle: string; - address: Address; -} - -export interface Address { - street: string; - city: string; - state: string; - country: string; - postalCode: string; - phone: string; -} - export type SetPublicShareProp = React.Dispatch< React.SetStateAction >;