mirror of
https://github.com/BoostIo/Boostnote
synced 2026-05-10 09:42:33 +00:00
revive articledetail
This commit is contained in:
@@ -1,6 +1,22 @@
|
||||
var request = require('superagent-promise')(require('superagent'), Promise)
|
||||
var apiUrl = require('../../../../config').apiUrl
|
||||
|
||||
export function fetchCurrentUser () {
|
||||
return request
|
||||
.get(apiUrl + 'auth/user')
|
||||
.set({
|
||||
Authorization: 'Bearer ' + localStorage.getItem('token')
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchArticles (userId) {
|
||||
return request
|
||||
.get(apiUrl + 'teams/' + userId + '/articles')
|
||||
.set({
|
||||
Authorization: 'Bearer ' + localStorage.getItem('token')
|
||||
})
|
||||
}
|
||||
|
||||
export function createTeam (input) {
|
||||
return request
|
||||
.post(apiUrl + 'teams')
|
||||
|
||||
11
browser/main/HomeContainer/lib/markdown.js
Normal file
11
browser/main/HomeContainer/lib/markdown.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import markdownit from 'markdown-it'
|
||||
|
||||
var md = markdownit({
|
||||
typographer: true,
|
||||
linkify: true
|
||||
})
|
||||
|
||||
export default function markdown (content) {
|
||||
if (content == null) content = ''
|
||||
return md.render(content.toString())
|
||||
}
|
||||
Reference in New Issue
Block a user