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.photo) {
|
||||
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++) {
|
||||
result[`video${i + 1}`] = result.media.video[i];
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
delete result.media;
|
||||
}
|
||||
|
||||
+2
-2
@@ -8,14 +8,14 @@ export default interface UeuseCreate {
|
||||
/** 本文 */
|
||||
text: string;
|
||||
/** メディア */
|
||||
media: Media;
|
||||
media?: Media;
|
||||
/** NSFWにするかどうか */
|
||||
nsfw?: boolean;
|
||||
/** 返信先ユーズのユニークID */
|
||||
replyid?: string;
|
||||
/** リユーズ/引用元ユーズのユニークID */
|
||||
reuseid?: string;
|
||||
} & Media;
|
||||
};
|
||||
response: {
|
||||
/** 成功かどうか */
|
||||
success: true;
|
||||
|
||||
Vendored
+2
-2
@@ -1,8 +1,8 @@
|
||||
export interface Media {
|
||||
/** 画像URL */
|
||||
photo: string[];
|
||||
/** 動画URL */
|
||||
video: string[];
|
||||
///** 動画URL */
|
||||
//video: string[];
|
||||
};
|
||||
|
||||
export default interface ueuseModule {
|
||||
|
||||
Reference in New Issue
Block a user