-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'chore-update-dependencies' of github.com:dailydotdev/da…
…ily-api into chore-update-dependencies
- Loading branch information
Showing
8 changed files
with
165 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"id":1,"title":"Community recommendations","description":"Show posts that are recommended by other community members.","group":"advanced","defaultEnabledState":true,"options":{}},{"id":2,"title":"Tech magazines","description":"Show tech news posts that are not related directly to programming, for example, reports about tech companies, startups, venture capital, and scientific discoveries.","group":"advanced","defaultEnabledState":true,"options":{}},{"id":3,"title":"Newsletters","description":"Show posts that were published on developer newsletters. Such posts usually contain curated lists and opinionated essays.","group":"advanced","defaultEnabledState":true,"options":{}},{"id":4,"title":"Product launches","description":"Show posts that aim to help you discover new product launches or major releases to existing developer tools.","group":"advanced","defaultEnabledState":true,"options":{}},{"id":5,"title":"Showcases","description":"Show posts that aim to showcase a project or other types of code snippets. These posts usually provide a demo-only of the showcased work without broader context around it.","group":"advanced","defaultEnabledState":true,"options":{}},{"id":6,"title":"Non-editorial content","description":"Show user-generated posts that were created on external blogging platforms. Such posts are usually not checked by professional editors for fact accuracy, spelling, grammar, and punctuation.","group":"advanced","defaultEnabledState":true,"options":{}},{"id":7,"title":"Videos","description":"Show video posts on my feed","group":"content_types","defaultEnabledState":true,"options":{"type":"video:youtube"}}] | ||
[{"id":1,"title":"Community recommendations","description":"Show posts that are recommended by other community members.","group":"advanced","defaultEnabledState":true,"options":{}},{"id":2,"title":"Tech magazines","description":"Show tech news posts that are not related directly to programming, for example, reports about tech companies, startups, venture capital, and scientific discoveries.","group":"advanced","defaultEnabledState":true,"options":{}},{"id":3,"title":"Newsletters","description":"Show posts that were published on developer newsletters. Such posts usually contain curated lists and opinionated essays.","group":"advanced","defaultEnabledState":true,"options":{}},{"id":4,"title":"Product launches","description":"Show posts that aim to help you discover new product launches or major releases to existing developer tools.","group":"advanced","defaultEnabledState":true,"options":{}},{"id":5,"title":"Showcases","description":"Show posts that aim to showcase a project or other types of code snippets. These posts usually provide a demo-only of the showcased work without broader context around it.","group":"advanced","defaultEnabledState":true,"options":{}},{"id":6,"title":"Non-editorial content","description":"Show user-generated posts that were created on external blogging platforms. Such posts are usually not checked by professional editors for fact accuracy, spelling, grammar, and punctuation.","group":"advanced","defaultEnabledState":true,"options":{}},{"id":7,"title":"Videos","description":"Show video posts on my feed","group":"content_types","defaultEnabledState":true,"options":{"type":"video:youtube"}},{"id":8,"title":"Article","description":"Show article posts on my feed","group":"content_types","defaultEnabledState":true,"options":{"type":"article"}},{"id":9,"title":"Share","description":"Show share posts on my feed","group":"content_types","defaultEnabledState":true,"options":{"type":"share"}},{"id":10,"title":"Freeform","description":"Show freeform posts on my feed","group":"content_types","defaultEnabledState":true,"options":{"type":"freeform"}},{"id":11,"title":"Welcome","description":"Show welcome posts on my feed","group":"content_types","defaultEnabledState":true,"options":{"type":"welcome"}},{"id":12,"title":"Collection","description":"Show collection posts on my feed","group":"content_types","defaultEnabledState":true,"options":{"type":"collection"}}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { | ||
Column, | ||
Entity, | ||
Index, | ||
ManyToOne, | ||
PrimaryGeneratedColumn, | ||
} from 'typeorm'; | ||
import type { User } from './user'; | ||
import { ReportReason } from './common'; | ||
|
||
@Entity() | ||
export class UserReport { | ||
@PrimaryGeneratedColumn('uuid') | ||
id: string; | ||
|
||
@Column({ type: 'text' }) | ||
@Index('IDX_user_report_reported_user_id') | ||
reportedUserId: string; | ||
|
||
@Column({ type: 'text' }) | ||
userId: string; | ||
|
||
@Column({ default: () => 'now()' }) | ||
createdAt: Date; | ||
|
||
@Column({ length: 36, type: 'varchar' }) | ||
reason: ReportReason; | ||
|
||
@Column({ type: 'text', nullable: true }) | ||
note: string; | ||
|
||
@ManyToOne('User', { | ||
lazy: true, | ||
onDelete: 'CASCADE', | ||
}) | ||
user: Promise<User>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
||
export class UserReport1736363898760 implements MigrationInterface { | ||
name = 'UserReport1736363898760' | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`CREATE TABLE IF NOT EXISTS "user_report" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "reportedUserId" text NOT NULL, "userId" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "reason" character varying(36) NOT NULL, "note" text, CONSTRAINT "PK_58c08f0e20fa66561b119421eb2" PRIMARY KEY ("id"))`); | ||
await queryRunner.query(`CREATE INDEX IF NOT EXISTS "IDX_user_report_reported_user_id" ON "user_report" ("reportedUserId") `); | ||
await queryRunner.query(`ALTER TABLE "user_report" ADD CONSTRAINT "FK_cfc9cf9a552e98d6a634377496f" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`ALTER TABLE "user_report" DROP CONSTRAINT "FK_cfc9cf9a552e98d6a634377496f"`); | ||
await queryRunner.query(`DROP INDEX IF EXISTS "public"."IDX_user_report_reported_user_id"`); | ||
await queryRunner.query(`DROP TABLE IF EXISTS "user_report"`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters