mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 11:46:23 +00:00
Further transition from HTTP to HTTPS (#14039)
This commit is contained in:
parent
4da6467486
commit
4d10c53216
19 changed files with 30 additions and 30 deletions
|
|
@ -119,7 +119,7 @@ function path(obj, path, def) {
|
|||
* @param {String} path dot separated
|
||||
* @param {*} def default value ( if result undefined )
|
||||
* @returns {*}
|
||||
* http://stackoverflow.com/a/16190716
|
||||
* https://stackoverflow.com/a/16190716
|
||||
* Usage: console.log(path(someObject, pathname));
|
||||
*/
|
||||
for(var i = 0,path = path.split('.'),len = path.length; i < len; i++){
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// TODO it might be better we just find() and save() all user objects using mongoose, and rely on our defined pre('save')
|
||||
// and default values to "migrate" users. This way we can make sure those parts are working properly too
|
||||
// @see http://stackoverflow.com/questions/14867697/mongoose-full-collection-scan
|
||||
// @see https://stackoverflow.com/questions/14867697/mongoose-full-collection-scan
|
||||
// Also, what do we think of a Mongoose Migration module? something like https://github.com/madhums/mongoose-migrate
|
||||
|
||||
// IMPORTANT NOTE: this migration was written when we were using version 3 of lodash.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ const Timer = require('./utils/timer');
|
|||
const connectToDb = require('./utils/connect').connectToDb;
|
||||
const closeDb = require('./utils/connect').closeDb;
|
||||
|
||||
const message = '`This party\'s collection quest has been made easier! For details, refer to http://habitica.fandom.com/wiki/User_blog:LadyAlys/Collection_Quests_are_Now_Easier`';
|
||||
const message = '`This party\'s collection quest has been made easier! For details, refer to https://habitica.fandom.com/wiki/User_blog:LadyAlys/Collection_Quests_are_Now_Easier`';
|
||||
|
||||
const timer = new Timer();
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ AWS.config.update({
|
|||
const BUCKET_NAME = config.S3.bucket;
|
||||
const s3 = new AWS.S3();
|
||||
|
||||
// Adapted from http://stackoverflow.com/a/22210077/2601552
|
||||
// Adapted from https://stackoverflow.com/a/22210077/2601552
|
||||
function uploadFile (buffer, fileName) {
|
||||
return new Promise((resolve, reject) => {
|
||||
s3.putObject({
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// For some reason people often to contact me to cancel their sub,
|
||||
// rather than do it online. Even when I point them to
|
||||
// the FAQ (http://goo.gl/1uoPGQ) they insist...
|
||||
// the FAQ (https://habitica.fandom.com/wiki/FAQ) they insist...
|
||||
|
||||
db.users.update(
|
||||
{ _id: '' },
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ app.post('/webhooks/:id', (req, res) => {
|
|||
});
|
||||
|
||||
// Helps close down server from within mocha test
|
||||
// See http://stackoverflow.com/a/37054753/2601552
|
||||
// See https://stackoverflow.com/a/37054753/2601552
|
||||
const sockets = {};
|
||||
server.on('connection', socket => {
|
||||
const id = uuid();
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="http://blog.habitrpg.com/"
|
||||
href="https://blog.habitrpg.com/"
|
||||
target="_blank"
|
||||
>{{ $t('tumblr') }}</a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
</a>
|
||||
<a
|
||||
href="https://geo.itunes.apple.com/us/app/habitica/id994882113?mt=8"
|
||||
style="display:inline-block;overflow:hidden;background:url(http://linkmaker.itunes.apple.com/images/badges/en-us/badge_appstore-lrg.svg#svgView) no-repeat;background-size:100%;width:152px;height:45px;margin-left:20px;image-rendering:auto"
|
||||
style="display:inline-block;overflow:hidden;background:url(https://linkmaker.itunes.apple.com/images/badges/en-us/badge_appstore-lrg.svg#svgView) no-repeat;background-size:100%;width:152px;height:45px;margin-left:20px;image-rendering:auto"
|
||||
></a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
<li class="nav-item">
|
||||
<a
|
||||
class="nav-link"
|
||||
href="http://blog.habitrpg.com/"
|
||||
href="https://blog.habitrpg.com/"
|
||||
target="_blank"
|
||||
>{{ $t('tumblr') }}</a>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<noscript class="banner">
|
||||
{{ $t('jsDisabledHeadingFull') }}
|
||||
<br />
|
||||
<a href="http://www.enable-javascript.com/" target="_blank">{{ $t('jsDisabledLink') }}</a>
|
||||
<a href="https://www.enable-javascript.com/" target="_blank">{{ $t('jsDisabledLink') }}</a>
|
||||
</noscript>
|
||||
<div
|
||||
id="intro-signup"
|
||||
|
|
|
|||
|
|
@ -137,15 +137,15 @@
|
|||
browser which allows you to refuse cookies. Further information about the procedure to follow in order to
|
||||
disable cookies can be found on your Internet browser provider’s website via your help screen. You may
|
||||
wish to refer to <a
|
||||
href="http://www.allaboutcookies.org/manage-cookies/index.html"
|
||||
href="https://www.allaboutcookies.org/manage-cookies/index.html"
|
||||
target="_blank"
|
||||
>
|
||||
http://www.allaboutcookies.org/manage-cookies/index.html</a> for information on commonly used browsers.
|
||||
https://www.allaboutcookies.org/manage-cookies/index.html</a> for information on commonly used browsers.
|
||||
For more information about targeting and advertising cookies and how you can opt out, you can also visit
|
||||
<a
|
||||
href="http://optout.aboutads.info"
|
||||
href="https://optout.aboutads.info"
|
||||
target="_blank"
|
||||
>http://optout.aboutads.info</a>. Please be aware
|
||||
>https://optout.aboutads.info</a>. Please be aware
|
||||
that if cookies are disabled, not all features of the Service may operate properly or as intended.
|
||||
</p>
|
||||
<h3>Third-Party Analytics Providers</h3>
|
||||
|
|
|
|||
|
|
@ -70,9 +70,9 @@
|
|||
<p>WITHIN THIRTY (30) DAYS OF YOUR PREMIUM PAYMENT DATE AS SHOWN ON YOUR PAYMENT BILL, YOU CAN REQUEST A FULL REFUND BY CONTACTING US AT ADMIN@HABITICA.COM. AFTER THIRTY (30) DAYS OF YOUR PREMIUM PAYMENT DATE, ANY PAYMENT REFUND IS SOLELY SUBJECT TO OUR DISCRETION. THE REFUND SHALL BE YOUR SOLE AND EXCLUSIVE REMEDY.</p>
|
||||
<p>
|
||||
FOR ANY CUSTOMER WHO PURCHASED PREMIUM IN APPLE INC.'s APP STORE ("APP STORE"), PLEASE CONTACT APPLE INC.'s SUPPORT TEAM: <a
|
||||
href="http://reportaproblem.apple.com"
|
||||
href="https://reportaproblem.apple.com"
|
||||
target="_blank"
|
||||
>http://reportaproblem.apple.com</a>. APPLE'S APP STORE DOES NOT ALLOW DEVELOPERS TO ISSUE REFUND FOR APP STORE PURCHASES MADE BY CUSTOMERS.
|
||||
>https://reportaproblem.apple.com</a>. APPLE'S APP STORE DOES NOT ALLOW DEVELOPERS TO ISSUE REFUND FOR APP STORE PURCHASES MADE BY CUSTOMERS.
|
||||
</p>
|
||||
<h2>Warranty Disclaimer</h2>
|
||||
<p>THE SERVICE AND ANY CONTENT MADE AVAILABLE BY HABITRPG VIA THE SERVICE IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT ANY WARRANTIES OF ANY KIND, INCLUDING, WITHOUT LIMITATION, THAT THE SERVICE OR CONTENT WILL OPERATE ERROR-FREE OR THAT THE SERVICE OR CONTENT OR ITS SERVERS ARE FREE OF COMPUTER VIRUSES OR SIMILAR CONTAMINATION OR DESTRUCTIVE FEATURES.</p>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
HabitRPG's translations are managed at http://translate.habitica.com/
|
||||
HabitRPG's translations are managed at https://translate.habitica.com/
|
||||
|
||||
The files in this folder are automatically pulled from there, with
|
||||
exception of the original American-English strings which are managed
|
||||
|
|
@ -10,5 +10,5 @@ request that your changes be translated; changes are automatically
|
|||
copied to the translation website on a regular basis.
|
||||
|
||||
If you want to help with translations, please first read [Guidance for
|
||||
Linguists](http://habitica.fandom.com/wiki/Guidance_for_Linguists) and
|
||||
Linguists](https://habitica.fandom.com/wiki/Guidance_for_Linguists) and
|
||||
note especially its information about the [Translations Trello card](https://trello.com/c/SvTsLdRF/12-translations).
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ function equipmentStatBonusComputed (stat, user) {
|
|||
|
||||
// toObject is required here due to lodash values not working well with mongoose doc objects.
|
||||
// if toObject doesn't exist, we can assume the object is already plain JSON
|
||||
// see http://stackoverflow.com/questions/25767334/underscore-js-keys-and-omit-not-working-as-expected
|
||||
// see https://stackoverflow.com/questions/25767334/underscore-js-keys-and-omit-not-working-as-expected
|
||||
const { equipped } = user.items.gear;
|
||||
const equippedKeys = values(!equipped.toObject ? equipped : equipped.toObject());
|
||||
|
||||
|
|
|
|||
|
|
@ -1318,8 +1318,8 @@ api.userSell = {
|
|||
* @apiParam (Query) {String} path Full path to unlock. See "content" API call for list of items.
|
||||
*
|
||||
* @apiParamExample {curl} Example call:
|
||||
* curl -X POST http://habitica.com/api/v3/user/unlock?path=background.midnight_clouds
|
||||
* curl -X POST http://habitica.com/api/v3/user/unlock?path=hair.color.midnight
|
||||
* curl -X POST https://habitica.com/api/v3/user/unlock?path=background.midnight_clouds
|
||||
* curl -X POST https://habitica.com/api/v3/user/unlock?path=hair.color.midnight
|
||||
*
|
||||
* @apiSuccess {Object} data.purchased
|
||||
* @apiSuccess {Object} data.items
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ const api = {};
|
|||
* @apiParamExample {json} Task Activity Example
|
||||
* {
|
||||
* "enabled": true, // default
|
||||
* "url": "http://some-webhook-url.com",
|
||||
* "url": "https://some-webhook-url.com",
|
||||
* "label": "My Webhook",
|
||||
* "type": "taskActivity", // default
|
||||
* "options": {
|
||||
|
|
@ -56,7 +56,7 @@ const api = {};
|
|||
* @apiParamExample {json} Group Chat Received Example
|
||||
* {
|
||||
* "enabled": true,
|
||||
* "url": "http://some-webhook-url.com",
|
||||
* "url": "https://some-webhook-url.com",
|
||||
* "label": "My Chat Webhook",
|
||||
* "type": "groupChatReceived",
|
||||
* "options": {
|
||||
|
|
@ -66,7 +66,7 @@ const api = {};
|
|||
* @apiParamExample {json} User Activity Example
|
||||
* {
|
||||
* "enabled": true,
|
||||
* "url": "http://some-webhook-url.com",
|
||||
* "url": "https://some-webhook-url.com",
|
||||
* "label": "My Activity Webhook",
|
||||
* "type": "userActivity",
|
||||
* "options": { // set at least one to true
|
||||
|
|
@ -78,7 +78,7 @@ const api = {};
|
|||
* @apiParamExample {json} Quest Activity Example
|
||||
* {
|
||||
* "enabled": true,
|
||||
* "url": "http://some-webhook-url.com",
|
||||
* "url": "https://some-webhook-url.com",
|
||||
* "label": "My Quest Webhook",
|
||||
* "type": "questActivity",
|
||||
* "options": { // set at least one to true
|
||||
|
|
@ -89,7 +89,7 @@ const api = {};
|
|||
* }
|
||||
* @apiParamExample {json} Minimal Example
|
||||
* {
|
||||
* "url": "http://some-webhook-url.com"
|
||||
* "url": "https://some-webhook-url.com"
|
||||
* }
|
||||
*
|
||||
* @apiSuccess (201) {Object} data The created webhook
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ const updatablePaths = [
|
|||
];
|
||||
|
||||
// This tells us for which paths users can call `PUT /user`.
|
||||
// The trick here is to only accept leaf paths, not root/intermediate paths (see http://goo.gl/OEzkAs)
|
||||
// The trick here is to only accept leaf paths, not root/intermediate paths (see https://goo.gl/OEzkAs)
|
||||
const acceptablePUTPaths = _.reduce(UserSchema.paths, (accumulator, val, leaf) => {
|
||||
const found = _.find(updatablePaths, rootPath => leaf.indexOf(rootPath) === 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ schema.pre('save', true, function preSaveUser (next, done) {
|
|||
// use the default values defined in the user schema and not the real ones.
|
||||
//
|
||||
// To check if a field was selected Document.isDirectSelected('field') can be used.
|
||||
// more info on its usage can be found at http://mongoosejs.com/docs/api.html#document_Document-isDirectSelected
|
||||
// more info on its usage can be found at https://mongoosejs.com/docs/api.html#document_Document-isDirectSelected
|
||||
|
||||
// do not calculate achievements if items or achievements are not selected
|
||||
if (this.isDirectSelected('items') && this.isDirectSelected('achievements')) {
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ export default new Schema({
|
|||
},
|
||||
// We want to know *every* time an object updates.
|
||||
// Mongoose uses __v to designate when an object contains arrays which
|
||||
// have been updated (http://goo.gl/gQLz41), but we want *every* update
|
||||
// have been updated, but we want *every* update
|
||||
_v: { $type: Number, default: 0 },
|
||||
migration: String,
|
||||
achievements: {
|
||||
|
|
@ -441,7 +441,7 @@ export default new Schema({
|
|||
// Using an array without validation because otherwise mongoose
|
||||
// treat this as a subdocument and applies _id by default
|
||||
// Schema is (id, name, inviter, publicGuild)
|
||||
// TODO one way to fix is http://mongoosejs.com/docs/guide.html#_id
|
||||
// TODO one way to fix is https://mongoosejs.com/docs/guide.html#_id
|
||||
guilds: { $type: Array, default: () => [] },
|
||||
// Using a Mixed type because otherwise user.invitations.party = {}
|
||||
// to reset invitation, causes validation to fail TODO
|
||||
|
|
|
|||
Loading…
Reference in a new issue