fastify-resty
fastify-resty copied to clipboard
How to accept array data for entitycontroller?
import {Column, Entity, PrimaryColumn} from "typeorm";
export enum Permission {
MODIFY_PROFILE = 'modify-profile',
VIEW_PROFILE = 'view-profile',
}
@Entity()
export default class User {
@PrimaryColumn()
email!: string;
@Column({
type: "set",
enum: Permission,
nullable: true,
})
permissions!: Array<Permission>;
}
When using the controller, how do I set the permissions with multiple values? It seems like the code is only accepting it as a string so I can't provide multiple values.