Initial commit
This commit is contained in:
38
mock-server/api/common.js
Normal file
38
mock-server/api/common.js
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
const registerAPI = function (app) {
|
||||
app.post('/login', async (req, res) => {
|
||||
res.send({
|
||||
result: 'success'
|
||||
})
|
||||
})
|
||||
|
||||
// get user info
|
||||
app.get('/account/profile', async (req, res) => {
|
||||
res.send({
|
||||
id: '11122222',
|
||||
name: 'Joel',
|
||||
email: 'iamjoel007@gmail.com'
|
||||
})
|
||||
})
|
||||
|
||||
// logout
|
||||
app.get('/logout', async (req, res) => {
|
||||
res.send({
|
||||
result: 'success'
|
||||
})
|
||||
})
|
||||
|
||||
// Langgenius version
|
||||
app.get('/version', async (req, res) => {
|
||||
res.send({
|
||||
current_version: 'v1.0.0',
|
||||
latest_version: 'v1.0.0',
|
||||
upgradeable: true,
|
||||
compatible_upgrade: true
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
module.exports = registerAPI
|
||||
|
Reference in New Issue
Block a user