-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #303 from unarxiv/xzyaoi/feat/pipeline
Xzyaoi/feat/pipeline
- Loading branch information
Showing
25 changed files
with
352 additions
and
738 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
release: yarn run build | ||
web: node dist/src/server.js |
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,18 +1,15 @@ | ||
import { BaseContext } from 'koa' | ||
import axios from 'axios' | ||
import axios from 'axios'; | ||
import { BaseContext } from 'koa'; | ||
import { config } from '../config'; | ||
|
||
export default class NewsController { | ||
public static async queryNews (ctx: BaseContext) { | ||
console.log('quering news') | ||
await axios.get(config.blogURL + '/posts').then(function (res:any) { | ||
console.log(res) | ||
await axios.get(config.blogURL + '/posts').then(function (res: any) { | ||
ctx.status = 200; | ||
ctx.body = res.data.data.posts; | ||
}).catch(function (err) { | ||
console.log(err) | ||
ctx.status = 500; | ||
ctx.body = 'An error occured on the blog service'; | ||
}) | ||
}); | ||
} | ||
} |
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,15 +1,15 @@ | ||
import { BaseContext } from 'koa'; | ||
import paymentService from '../service/payment' | ||
import paymentService from '../service/payment'; | ||
|
||
export default class PaywallController { | ||
public static async createCustomer (ctx: BaseContext) { | ||
const requestbody = ctx.request.body | ||
const customer = await paymentService.createCustomer(requestbody.email) | ||
const requestbody = ctx.request.body; | ||
const customer = await paymentService.createCustomer(requestbody.email); | ||
ctx.status = 200; | ||
ctx.body = { | ||
'code': 200, | ||
'results': 'success', | ||
'customer': customer | ||
'customer': customer, | ||
'results': 'success' | ||
}; | ||
} | ||
} |
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,12 +1,12 @@ | ||
import { BaseContext } from 'koa'; | ||
import { getUserInfo } from '../service/auth' | ||
import { getUserInfo } from '../service/auth'; | ||
export default class UserController { | ||
/** | ||
* Validate Access Token, a.k.a Get User information | ||
* @param ctx | ||
*/ | ||
public static async validateAccessToken(ctx: BaseContext) { | ||
const body = ctx.request.body; | ||
getUserInfo(body.accessToken) | ||
getUserInfo(body.accessToken); | ||
} | ||
} |
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,8 +1,8 @@ | ||
import { config } from './config'; | ||
|
||
const Sentry = require('@sentry/node') | ||
Sentry.init({}) | ||
const Sentry = require('@sentry/node'); | ||
Sentry.init({}); | ||
|
||
export { | ||
Sentry | ||
} | ||
}; |
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
Oops, something went wrong.