mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-11 08:43:59 +03:00
615a482c48
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
11 lines
225 B
JavaScript
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
|
|
}
|
|
};
|