git ssb

2+

Dominic / yap



Tree: 2e24f63f3e975823d94bc8e83243dd998d9caa5f

Files: 2e24f63f3e975823d94bc8e83243dd998d9caa5f / apis / compose.js

560 bytesRaw
1var ref = require('ssb-ref')
2var Translations = require('../translations')
3
4var u = require('yap-util')
5
6module.exports = function (sbot) {
7 return function (opts, apply, req) {
8 var context = req.cookies
9 var id = opts.id
10 var content = opts.meta || opts.content || {}
11 content.type = content.type || 'post'
12 var tr = Translations(context.lang)
13 return apply('publish', {
14 id: opts.id,
15 content: content,
16 private: opts.private,
17 inputs: ['textarea', {name: 'content[text]'}],
18 name: tr('Preview')
19 })
20 }
21}
22
23
24
25
26

Built with git-ssb-web