controllers/userController.js
/**
   * Replies with user data for current user session.
   *
   * User email is retrieved from session and used to retrieve the data from
   * data store.
   *
   * @param {fastify.Request} req Fastify request instance.
   * @param {fastify.Reply} rep Fastify reply instance.
   */
Replies with user data for current user session.
User email is retrieved from session and used to retrieve the data from
data store.

@param {fastify.Request} req Fastify request instance.
@param {fastify.Reply} rep Fastify reply instance.
Replies with user data for current user session . User email is retrieved from session and used to retrieve the data from data store . @param { fastify . Request } req Fastify request instance . @param { fastify . Reply } rep Fastify reply instance .
static async handleGetUserProfile(req, rep) {
    const user = await this.models.user.findOne({
      where: {
        id: req.user.id,
        email: req.user.email
      }
    });
    const serializedUser = UserSerializer.serialize(user);
    await rep.send(serializedUser);
  }
static async handleGetUserProfile ( req , rep ) { const user = await this . models . user . findOne ( { where : { id : req . user . id , email : req . user . email } } ) ; const serializedUser = UserSerializer . serialize ( user ) ; await rep . send ( serializedUser ) ; }
Replies with user data for current user session.
Replies with user data for current user session .