feathersjs中的类是什么以及如何实现

问题描述 投票:0回答:1

是feathersjs的新手,我尝试在其中的users.class.js文件下创建服务时在feathers中进行本地身份验证。我不知道在那实施什么,所以请以此为指导。

const { Service } = require('feathers-mongoose');

exports.Users = class Users extends Service {
  create(Users, email, username, password, role ) {
    Users.created_at = new Date();

    return super.create(Users, email, username, password, role );
  }
  update(id, Users, users) {
    Users.updated_at = new Date();

    return super.update(id, Users, users);
  }
};

是feathersjs的新手,我尝试在其中的users.class.js文件下创建服务时在feathers中进行本地身份验证。我不知道在那实现什么,所以请用这个const {...

feathersjs feathers-authentication feathers-service
1个回答
1
投票

我将查看docs以了解有关服务的更多信息。

© www.soinside.com 2019 - 2024. All rights reserved.