GladysProject/Gladys

View on GitHub
server/lib/room/room.init.js

Summary

Maintainability
A
0 mins
Test Coverage
/**
 * @description Init room.
 * @example
 * room.init();
 */
async function init() {
  const rooms = await this.getAll();

  rooms.forEach((room) => {
    this.brain.addNamedEntity('room', room.id, room.name);
  });
}

module.exports = {
  init,
};