-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: router namespaces * feat: recursive controller loading and namespacing * feat: add namespaced controllers to namespaces and resources * feat: add namespaced serializers to controllers * refactor: cleanup work for namespaces implementation * refactor: cleanup continued * fix: do not deep freeze props by default * refactor: continued cleanup part 2 * refactor: continued cleanup part 3 * feat: enable generating nested resources * feat: update routes.js file when resources are generated * fix: new flow type errors * fix: failing builds on windows * fix: resolve .js files from rollup alias * fix: include extension in test app aliased imports * fix: user '/' as key separator in resolver
- Loading branch information
1 parent
1f9094e
commit 1adeb90
Showing
143 changed files
with
2,627 additions
and
1,383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,36 @@ | ||
export default function routes() { | ||
this.resource('comments'); | ||
this.resource('posts'); | ||
this.resource('reactions'); | ||
this.resource('tags'); | ||
this.resource('users'); | ||
|
||
this.route('actions', { | ||
method: 'GET', | ||
action: 'index' | ||
this.resource('actions', { | ||
only: ['show', 'index'] | ||
}); | ||
|
||
this.route('actions/:id', { | ||
method: 'GET', | ||
action: 'show' | ||
}); | ||
this.resource('comments'); | ||
|
||
this.route('friendships', { | ||
method: 'POST', | ||
action: 'create' | ||
this.resource('friendships', { | ||
only: ['create', 'destroy'] | ||
}); | ||
|
||
this.route('notifications', { | ||
method: 'GET', | ||
action: 'index' | ||
this.resource('notifications', { | ||
only: ['show', 'index'] | ||
}); | ||
|
||
this.route('notifications/:id', { | ||
method: 'GET', | ||
action: 'show' | ||
this.resource('posts'); | ||
this.resource('reactions'); | ||
this.resource('tags'); | ||
|
||
this.resource('users', function () { | ||
this.collection(function () { | ||
this.post('login'); | ||
}); | ||
}); | ||
|
||
this.route('users/login', { | ||
method: 'POST', | ||
action: 'login' | ||
this.namespace('admin', function () { | ||
this.resource('actions'); | ||
this.resource('comments'); | ||
this.resource('friendships'); | ||
this.resource('notifications'); | ||
this.resource('posts'); | ||
this.resource('reactions'); | ||
this.resource('tags'); | ||
this.resource('users'); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
// @flow | ||
import type { Config } from '../config'; | ||
import type { Database$config } from '../database'; | ||
import type Database, { Database$config } from '../database'; | ||
import type Controller from '../controller'; | ||
import type Serializer from '../serializer'; | ||
|
||
export type Application$opts = Config & { | ||
path: string; | ||
port: number; | ||
database: Database$config; | ||
}; | ||
|
||
export type Application$factoryOpts<T: Controller | Serializer<*>> = { | ||
key: string; | ||
store: Database; | ||
parent: ?T; | ||
}; |
Oops, something went wrong.