also looking at this
UI polish, real queue + scheduling, Bluesky threads, live analytics, blog target
#8
54 files
+2036
-589
| @@ -0,0 +1,22 @@ | ||
| 1 | import { Action } from '@stacksjs/actions' | |
| 2 | import { response } from '@stacksjs/router' | |
| 3 | import { blog } from '../../Services/Social/BlogService' | |
| 4 | ||
| 5 | export default new Action({ | |
| 6 | name: 'Postline Blog List', | |
| 7 | description: 'List published blog posts.', | |
| 8 | method: 'GET', | |
| 9 | ||
| 10 | async handle() { | |
| 11 | try { | |
| 12 | const items = await blog.list() | |
| 13 | return response.json({ ok: true, data: { items } }) | |
| 14 | } | |
| 15 | catch (error) { | |
| 16 | return response.json({ | |
| 17 | ok: false, | |
| 18 | error: error instanceof Error ? error.message : String(error), | |
| 19 | }, { status: 500 }) | |
| 20 | } | |
| 21 | }, | |
| 22 | }) | |