Ghost/ghost/members-api/test/.eslintrc.js
Kevin Ansfield 615a482c48 Store geolocation data during member signup/signin (#128)
requires f38d490886

- adds `lib/geolocation.js` with `getGeolocationFromIP()` function which uses https://geojs.io to lookup geolocation data from an IPv4 or IPv6 address
- updates `create/updateMember()` functions to work with a `geolocation` property in the passed in object
  - if `geolocation` is `undefined` when updating a member do not reset any existing property
- updates `sendMagicLink` middleware to extract the IP address from the request and stores it as part of the token payload
- updates `getMemberDataFromMagicLinkToken()` method to extract the IP address from the token payload and perform a geolocation lookup if we have an IP address and a matching member does not already have geolocation data
2020-02-27 10:29:36 +00:00

11 lines
225 B
JavaScript

module.exports = {
plugins: ['ghost'],
extends: [
'plugin:ghost/test',
],
// TODO: why is this needed for async/await? Check eslint-plugin-ghost
parserOptions: {
ecmaVersion: 2017
}
};