buttons
This commit is contained in:
parent
abd7c2f073
commit
384da1e832
18 changed files with 150 additions and 116 deletions
|
@ -4,7 +4,12 @@ import client from '../../api/client.ts'
|
|||
export class PostsService {
|
||||
constructor() {}
|
||||
|
||||
async createNew(authorId: string, content: string, media: CreatePostMedia[]): Promise<string> {
|
||||
async createNew(
|
||||
authorId: string,
|
||||
content: string,
|
||||
media: CreatePostMedia[],
|
||||
isPublic: boolean,
|
||||
): Promise<string> {
|
||||
const response = await client.POST('/posts', {
|
||||
body: {
|
||||
authorId,
|
||||
|
@ -12,6 +17,7 @@ export class PostsService {
|
|||
media: media.map((m) => {
|
||||
return { ...m, type: null, url: m.url.toString() }
|
||||
}),
|
||||
isPublic,
|
||||
},
|
||||
credentials: 'include',
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue