Fix: map should redirect to current challenge (#15723)
* fix(routes): /map redirects to current challenge * fix(map): Normalize server map building Localize all server code dealing with the map * refactor(server): Remove unused services * feat(Nav): Show Map button when no panes This gives user the ability to quickly return to their challenge using a known feature * fix(server.map): Add caching to nameIdMap Add caching to nameIdMap on the server * fix(services.map): Fix map service Move map building utils to map util. Fix bad import. Normalize challenge lookup
This commit is contained in:
committed by
Quincy Larson
parent
f92294bbda
commit
c547c26bba
12
common/models/challenge.js
Normal file
12
common/models/challenge.js
Normal file
@ -0,0 +1,12 @@
|
||||
import { Observable } from 'rx';
|
||||
|
||||
export default function(Challenge) {
|
||||
Challenge.on('dataSourceAttached', () => {
|
||||
Challenge.findOne$ =
|
||||
Observable.fromNodeCallback(Challenge.findOne, Challenge);
|
||||
Challenge.findById$ =
|
||||
Observable.fromNodeCallback(Challenge.findById, Challenge);
|
||||
Challenge.find$ =
|
||||
Observable.fromNodeCallback(Challenge.find, Challenge);
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user