Fix: ueuse/create / Fix: parser
This commit is contained in:
+3
-3
@@ -41,15 +41,15 @@ const Parser: parserType = (data, type, endpoint) => {
|
|||||||
if (result.media && result.text && endpoint === "ueuse/create") {
|
if (result.media && result.text && endpoint === "ueuse/create") {
|
||||||
if (result.media.photo) {
|
if (result.media.photo) {
|
||||||
for (let i = 0; i < result.media.photo.length; i++) {
|
for (let i = 0; i < result.media.photo.length; i++) {
|
||||||
result[`photo${i + 1}`] = result.media.photo[i];
|
result[`image${i + 1}`] = result.media.photo[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.media.video) {
|
/*if (result.media.video) {
|
||||||
for (let i = 0; i < result.media.video.length; i++) {
|
for (let i = 0; i < result.media.video.length; i++) {
|
||||||
result[`video${i + 1}`] = result.media.video[i];
|
result[`video${i + 1}`] = result.media.video[i];
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
delete result.media;
|
delete result.media;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -8,14 +8,14 @@ export default interface UeuseCreate {
|
|||||||
/** 本文 */
|
/** 本文 */
|
||||||
text: string;
|
text: string;
|
||||||
/** メディア */
|
/** メディア */
|
||||||
media: Media;
|
media?: Media;
|
||||||
/** NSFWにするかどうか */
|
/** NSFWにするかどうか */
|
||||||
nsfw?: boolean;
|
nsfw?: boolean;
|
||||||
/** 返信先ユーズのユニークID */
|
/** 返信先ユーズのユニークID */
|
||||||
replyid?: string;
|
replyid?: string;
|
||||||
/** リユーズ/引用元ユーズのユニークID */
|
/** リユーズ/引用元ユーズのユニークID */
|
||||||
reuseid?: string;
|
reuseid?: string;
|
||||||
} & Media;
|
};
|
||||||
response: {
|
response: {
|
||||||
/** 成功かどうか */
|
/** 成功かどうか */
|
||||||
success: true;
|
success: true;
|
||||||
|
|||||||
Vendored
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
export interface Media {
|
export interface Media {
|
||||||
/** 画像URL */
|
/** 画像URL */
|
||||||
photo: string[];
|
photo: string[];
|
||||||
/** 動画URL */
|
///** 動画URL */
|
||||||
video: string[];
|
//video: string[];
|
||||||
};
|
};
|
||||||
|
|
||||||
export default interface ueuseModule {
|
export default interface ueuseModule {
|
||||||
|
|||||||
Reference in New Issue
Block a user