const { BadRequest } = require('@feathersjs/errors');

const userDataFilter = user => ({
	userId: user._id,
	email: user.email,
	firstName: user.firstName,
	lastName: user.lastName,
	importHash: user.importHash,
	schoolId: user.schoolId,
	birthday: user.birthday,
});

class UserLinkImportService {
	constructor(userService) {
		this.userService = userService;
		this.docs = {};
	}

	get(hash) { // can not use get becouse the hash can have / that mapped to non existing routes
		return this.userService.find({ query: { importHash: hash } })
			.then((users) => {
				if (users.data.length !== 1) {
					throw new BadRequest('Can not match the hash.');
				}
				return userDataFilter(users.data[0]);
			}).catch(err => err);
	}
}

module.exports = UserLinkImportService;

@@ -721,16 +721,52 @@
 err);%0A%09%7D
+%0A%0A%09setup(app) %7B%0A%09%09this.app = app;%0A%09%7D
 %0A%7D%0A%0Amodu

Add missing setup in class.