2014-12-20 14:26:46 +08:00
|
|
|
import Ember from 'ember';
|
2014-12-23 10:15:07 +08:00
|
|
|
import config from './config/environment';
|
2014-12-20 14:26:46 +08:00
|
|
|
|
|
|
|
var Router = Ember.Router.extend({
|
2014-12-23 10:15:07 +08:00
|
|
|
location: config.locationType
|
2014-12-20 14:26:46 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
Router.map(function() {
|
2015-02-10 15:35:40 +08:00
|
|
|
this.resource('index', {path: '/'}, function() {
|
|
|
|
this.resource('discussion', {path: '/:id/:slug'}, function() {
|
|
|
|
this.route('near', {path: '/:near'});
|
2014-12-20 14:26:46 +08:00
|
|
|
});
|
2015-02-10 15:35:40 +08:00
|
|
|
});
|
2014-12-20 14:26:46 +08:00
|
|
|
|
2015-02-10 15:35:40 +08:00
|
|
|
this.resource('user', {path: '/u/:username'}, function() {
|
|
|
|
this.route('activity');
|
|
|
|
this.route('posts');
|
2015-03-12 08:10:03 +08:00
|
|
|
this.route('edit');
|
2015-02-10 15:35:40 +08:00
|
|
|
});
|
2015-01-03 09:56:22 +08:00
|
|
|
|
2015-03-12 08:10:03 +08:00
|
|
|
this.resource('settings');
|
2014-12-20 14:26:46 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
export default Router;
|