mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Removed v2 calls from views (#7351)
This commit is contained in:
committed by
Matteo Pagliazzi
parent
58b9a08539
commit
425172daae
@@ -1,4 +1,4 @@
|
|||||||
import { authWithHeaders } from '../../middlewares/api-v3/auth';
|
import { authWithHeaders, authWithSession } from '../../middlewares/api-v3/auth';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { model as Challenge } from '../../models/challenge';
|
import { model as Challenge } from '../../models/challenge';
|
||||||
import {
|
import {
|
||||||
@@ -340,7 +340,7 @@ api.getChallenge = {
|
|||||||
api.exportChallengeCsv = {
|
api.exportChallengeCsv = {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: '/challenges/:challengeId/export/csv',
|
url: '/challenges/:challengeId/export/csv',
|
||||||
middlewares: [authWithHeaders()],
|
middlewares: [authWithSession],
|
||||||
async handler (req, res) {
|
async handler (req, res) {
|
||||||
req.checkParams('challengeId', res.t('challengeIdRequired')).notEmpty().isUUID();
|
req.checkParams('challengeId', res.t('challengeIdRequired')).notEmpty().isUUID();
|
||||||
|
|
||||||
|
|||||||
@@ -133,11 +133,11 @@ script(type='text/ng-template', id='partials/options.settings.settings.html')
|
|||||||
.panel-body
|
.panel-body
|
||||||
div(ng-if='user.auth.facebook.id')
|
div(ng-if='user.auth.facebook.id')
|
||||||
button.btn.btn-primary(disabled='disabled', ng-if='!user.auth.local.username')=env.t('registeredWithFb')
|
button.btn.btn-primary(disabled='disabled', ng-if='!user.auth.local.username')=env.t('registeredWithFb')
|
||||||
button.btn.btn-danger(ng-click='http("delete","/api/v2/user/auth/social",null,"detachedFacebook")', ng-if='user.auth.local.username')=env.t('detachFacebook')
|
button.btn.btn-danger(ng-click='http("delete", "/api/v3/user/auth/social/facebook", null, "detachedFacebook")', ng-if='user.auth.local.username')=env.t('detachFacebook')
|
||||||
hr
|
hr
|
||||||
div(ng-if='!user.auth.local.username')
|
div(ng-if='!user.auth.local.username')
|
||||||
p=env.t('addLocalAuth')
|
p=env.t('addLocalAuth')
|
||||||
form(ng-submit='http("post","/api/v2/register",localAuth,"addedLocalAuth")', ng-init='localAuth={}', name='localAuth', novalidate)
|
form(ng-submit='http("post", "/api/v3/user/auth/local/register", localAuth, "addedLocalAuth")', ng-init='localAuth={}', name='localAuth', novalidate)
|
||||||
//-.alert.alert-danger(ng-messages='changeUsername.$error && changeUsername.submitted')=env.t('fillAll')
|
//-.alert.alert-danger(ng-messages='changeUsername.$error && changeUsername.submitted')=env.t('fillAll')
|
||||||
.form-group
|
.form-group
|
||||||
input.form-control(type='text', placeholder=env.t('username'), ng-model='localAuth.username', required)
|
input.form-control(type='text', placeholder=env.t('username'), ng-model='localAuth.username', required)
|
||||||
@@ -218,7 +218,7 @@ script(type='text/ng-template', id='partials/options.settings.promo.html')
|
|||||||
input.form-control(type='number',ng-model='_codes.count',placeholder="Number of codes to generate (eg, 250)")
|
input.form-control(type='number',ng-model='_codes.count',placeholder="Number of codes to generate (eg, 250)")
|
||||||
.form-group
|
.form-group
|
||||||
button.btn.btn-primary(type='submit')=env.t('generate')
|
button.btn.btn-primary(type='submit')=env.t('generate')
|
||||||
a.btn.btn-default(href='/api/v2/coupons?_id={{user._id}}&apiToken={{User.settings.auth.apiToken}}')=env.t('getCodes')
|
a.btn.btn-default(href='/api/v3/coupons?_id={{user._id}}&apiToken={{User.settings.auth.apiToken}}')=env.t('getCodes')
|
||||||
|
|
||||||
script(type='text/ng-template', id='partials/options.settings.api.html')
|
script(type='text/ng-template', id='partials/options.settings.api.html')
|
||||||
.container-fluid
|
.container-fluid
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ script(type='text/ng-template', id='partials/options.social.challenges.detail.ht
|
|||||||
|
|
||||||
// Member List
|
// Member List
|
||||||
div(bindonce='challenge', ng-if='challenge.members.length > 0')
|
div(bindonce='challenge', ng-if='challenge.members.length > 0')
|
||||||
a.btn.btn-primary.btn-sm.pull-right(ng-href='/api/v2/challenges/{{challenge._id}}/csv')
|
a.btn.btn-primary.btn-sm.pull-right(ng-href='/api/v3/challenges/{{challenge._id}}/export/csv')
|
||||||
=env.t('exportChallengeCSV')
|
=env.t('exportChallengeCSV')
|
||||||
h3=env.t('hows')
|
h3=env.t('hows')
|
||||||
menu
|
menu
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ script(type='text/ng-template', id='partials/options.social.hall.heroes.html')
|
|||||||
h4 Update Item
|
h4 Update Item
|
||||||
.form-group.well
|
.form-group.well
|
||||||
input.form-control(type='text',placeholder='Path (eg, items.pets.BearCub-Base)',ng-model='hero.itemPath')
|
input.form-control(type='text',placeholder='Path (eg, items.pets.BearCub-Base)',ng-model='hero.itemPath')
|
||||||
small.muted Enter the <strong>item path</strong>. E.g., <code>items.pets.BearCub-Zombie</code> or <code>items.gear.owned.head_special_0</code> or <code>items.gear.equipped.head</code>. <a href='/api/v2/content/paths' target='_blank'>See all paths here.</a> When in doubt, ask Tyler.
|
small.muted Enter the <strong>item path</strong>. E.g., <code>items.pets.BearCub-Zombie</code> or <code>items.gear.owned.head_special_0</code> or <code>items.gear.equipped.head</code>. <a href='/api/v3/content' target='_blank'>See all paths here.</a> When in doubt, ask Tyler.
|
||||||
br
|
br
|
||||||
input.form-control(type='text',placeholder='Value (eg, 5)',ng-model='hero.itemVal')
|
input.form-control(type='text',placeholder='Value (eg, 5)',ng-model='hero.itemVal')
|
||||||
small.muted Enter the <strong>item value</strong>. E.g., <code>5</code> or <code>false</code> or <code>head_warrior_3</code> (respectively from above examples).
|
small.muted Enter the <strong>item value</strong>. E.g., <code>5</code> or <code>false</code> or <code>head_warrior_3</code> (respectively from above examples).
|
||||||
|
|||||||
Reference in New Issue
Block a user