projeto-hit/backend/src/helpers/SerializeUser.ts

21 lines
382 B
TypeScript
Raw Normal View History

import Queue from "../models/Queue";
import User from "../models/User";
interface SerializedUser {
id: number;
name: string;
email: string;
profile: string;
queues: Queue[];
}
export const SerializeUser = (user: User): SerializedUser => {
return {
id: user.id,
name: user.name,
email: user.email,
profile: user.profile,
queues: user.queues
};
};