diff --git a/index.js b/index.js index 7a06e69..3beba55 100644 --- a/index.js +++ b/index.js @@ -147,18 +147,14 @@ module.exports = function defineWishHook(sails) { case 'google': if (!idToken) throw Error(`${idToken} is not a valid id_token`) try { - try { - user = await sails.helpers.fetch( - `${sails.config.wish[provider].userUrl}&access_token=${accessToken}`, - { - headers: { - Authorization: `Bearer ${idToken}`, - }, - } - ) - } catch (error) { - throw error - } + user = await sails.helpers.fetch( + `${sails.config.wish[provider].userUrl}&access_token=${accessToken}`, + { + headers: { + Authorization: `Bearer ${idToken}`, + }, + } + ) } catch (error) { throw error } diff --git a/package.json b/package.json index 19019c5..625e1ab 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "sails-hook-wish", "version": "0.0.7", "description": "The OAuth hook you wish exists for Sails", + "main": "index.js", "keywords": [ "sails oauth", "github oauth", @@ -11,6 +12,9 @@ "sails": { "isHook": true }, + "bugs": { + "url": "https://github.com/sailscastshq/sails-hook-wish/issues" + }, "devDependencies": { "@commitlint/cli": "^17.6.6", "@commitlint/config-conventional": "^17.6.6", @@ -23,6 +27,10 @@ "@sailscasts/sails-hook-node-fetch": "^0.0.3", "sails": "^1.5.2" }, + "repository": { + "type": "git", + "url": "git+https://github.com/sailscastshq/sails-hook-wish.git" + }, "author": "Kelvin Omereshone", "license": "MIT", "scripts": { diff --git a/tea.yaml b/tea.yaml new file mode 100644 index 0000000..eda2860 --- /dev/null +++ b/tea.yaml @@ -0,0 +1,6 @@ +# https://tea.xyz/what-is-this-file +--- +version: 1.0.0 +codeOwners: + - '0x6535eAC72ea8603FDE6E24458c46210EC2763646' +quorum: 1