You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
When adding a new service using feathers generate service and calling the service model, the following service file is generated.
// Initializes the `model` service on path `/model`const{ Model }=require('./model.class');constcreateModel=require('../../models/model.model');consthooks=require('./model.hooks');module.exports=function(app){constModel=createModel(app);constpaginate=app.get('paginate');constoptions={
Model,
paginate,};// Initialize our service with any options it requiresapp.use('/model',newModel(options,app));// Get our initialized service so that we can register hooksconstservice=app.service('model');service.hooks(hooks);};
This causes an issue, as wit hin the exported function, a local variable with the same name is created. An easy fix is of course to rename either one of the two, but it may be good to make sure this doesn't happen, as I can imagine model isn't that uncommon of a name for a service.
Expected behavior
No issues
Actual behavior
Issue as described above.
System configuration
Module versions (especially the part that's not working):
@feathersjs/cli 4.2.1
NodeJS version:
Operating System:
Browser Version:
React Native Version:
Module Loader:
The text was updated successfully, but these errors were encountered:
Steps to reproduce
When adding a new service using
feathers generate service
and calling the servicemodel
, the following service file is generated.This causes an issue, as wit hin the exported function, a local variable with the same name is created. An easy fix is of course to rename either one of the two, but it may be good to make sure this doesn't happen, as I can imagine
model
isn't that uncommon of a name for a service.Expected behavior
No issues
Actual behavior
Issue as described above.
System configuration
Module versions (especially the part that's not working):
@feathersjs/cli 4.2.1
NodeJS version:
Operating System:
Browser Version:
React Native Version:
Module Loader:
The text was updated successfully, but these errors were encountered: