This file contains hidden or 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
*Code to save Client and Scope:* | |
```javascript | |
let scope = new ScopeModel(); | |
scope.client = client._id; | |
scope.markModified('client'); | |
console.log(scope); | |
await scope.save(); | |
``` |
This file contains hidden or 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
/home/vagrant/api/node_modules/babel-core/lib/transformation/file/index.js:590 | |
throw err; | |
^ | |
SyntaxError: /home/vagrant/api/db/connection.js: Unexpected token (5:11) | |
3 | | |
4 | class ConnectionManager { | |
> 5 | protected mongoClient; | |
| ^ | |
6 | constructor() { |
This file contains hidden or 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
async getClient (clientId, clientSecret, callback) { | |
let client = await this.mongoClient.collection('client').findOne({"client" : clientId, "client_secret" : clientSecret}, {"_id" : 1}); | |
let scopes = await this.mongoClient.collection('scope').find({"client_id" : client._id }); | |
console.log(scopes.toArray()); | |
} |
This file contains hidden or 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
async getClient (clientId, clientSecret, callback) { | |
let client = await this.mongoClient.collection('client').findOne({"client" : clientId, "client_secret" : clientSecret}, {"_id" : 1}); | |
let scopes = await this.mongoClient.collection('scope').find({"client_id" : client._id }).toArray(); | |
console.log(scopes); | |
} |
This file contains hidden or 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
//App.js | |
var React = require('react'); | |
var CSSModules = require('react-css-modules'); | |
var ReactRouter = require('react-router-dom'); | |
var Router = ReactRouter.BrowserRouter; | |
var Route = ReactRouter.Route; | |
import styles from '../../../../sass/layout/_layout.scss'; | |
var Index = require('../pages/Index'); | |
var SideBar = require('../component/SideBar'); |
This file contains hidden or 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
$ npm run build | |
> [email protected] build /home/vagrant/Projects/com_oauth_manager/media/com_oauth_manager/js/com_oauthmanager | |
> webpack --progress --colors --watch --display-error-details | |
0% compiling | |
Webpack is watching the files… | |
Hash: adb43be39ed04e0ec5c3 | |
Version: webpack 3.7.1 |
This file contains hidden or 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
ERROR in ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!/home/vagrant/Projects/com_oauth_manager/media/com_oauth_manager/sass/layout/_layout.sass | |
Module build failed: | |
$base-font-family: $font-stack-system; | |
^ | |
Undefined variable: "$font-stack-system". | |
in /home/vagrant/Projects/com_oauth_manager/media/com_oauth_manager/sass/base/_variables.scss (line 2, column 20) | |
Error: | |
$base-font-family: $font-stack-system; | |
^ | |
Undefined variable: "$font-stack-system". |
This file contains hidden or 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
//ERROR | |
ERROR in ./app/index.js | |
Module parse failed: /home/vagrant/Projects/com_oauth_manager/media/com_oauth_manager/js/com_oauthmanager/app/index.js Unexpected token (6:16) | |
You may need an appropriate loader to handle this file type. | |
| var App = require('./component/App'); | |
| | |
| ReactDOM.render(<App />, document.getElementById('oauth-manager')); | |
//WEBPACK.CONFIG.JS | |
const ExtractTextPlugin = require("extract-text-webpack-plugin"); |
This file contains hidden or 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
ERROR in /home/vagrant/Projects/com_oauth_manager/media/com_oauth_manager/sass/layout/_layout.sass | |
Module build failed: | |
.oauth-manager-container { | |
^ | |
Invalid CSS after "...ger-container {": expected "}", was "{" | |
in /home/vagrant/Projects/com_oauth_manager/media/com_oauth_manager/sass/layout/_layout.sass (line 4, column 27) | |
Error: | |
.oauth-manager-container { | |
^ | |
Invalid CSS after "...ger-container {": expected "}", was "{" |
This file contains hidden or 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
ERROR in /home/vagrant/Projects/com_oauth_manager/media/com_oauth_manager/sass/layout/_layout.sass | |
Module parse failed: /home/vagrant/Projects/com_oauth_manager/media/com_oauth_manager/sass/layout/_layout.sass Unexpected character '@' (1:0) | |
You may need an appropriate loader to handle this file type. | |
| @import "bourbon/bourbon"; | |
| @import "base/base"; | |
| | |
@ ./app/component/App.js 5:0-47 | |
@ ./app/index.js | |