feat: make possible to configure following/followers visibility (#7959)
* feat: make possible to configure following/followers visibility * add test * ap * add ap test * set Cache-Control * hide following/followers count
This commit is contained in:
parent
07526ada45
commit
a28c515ef6
14 changed files with 317 additions and 10 deletions
16
migration/1636197624383-ff-visibility.ts
Normal file
16
migration/1636197624383-ff-visibility.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import {MigrationInterface, QueryRunner} from "typeorm";
|
||||
|
||||
export class ffVisibility1636197624383 implements MigrationInterface {
|
||||
name = 'ffVisibility1636197624383'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`CREATE TYPE "public"."user_profile_ffvisibility_enum" AS ENUM('public', 'followers', 'private')`);
|
||||
await queryRunner.query(`ALTER TABLE "user_profile" ADD "ffVisibility" "public"."user_profile_ffvisibility_enum" NOT NULL DEFAULT 'public'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "ffVisibility"`);
|
||||
await queryRunner.query(`DROP TYPE "public"."user_profile_ffvisibility_enum"`);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue