Add suno upload (#164)
This commit is contained in:
1 parent
ea8a77b010
commit
f0e5ec6f5e
59 files changed
+1334
-747
No files matched your search
+19
-1
@@ -5,7 +5,9 @@ import {
|
||||
ISunoLyricRequest,
|
||||
ISunoLyricResponse,
|
||||
ISunoTaskResponse,
|
||||
ISunoTasksResponse
|
||||
ISunoTasksResponse,
|
||||
ISunoUploadResponse,
|
||||
ISunoUploadRequest
|
||||
} from '@/models';
|
||||
import { BASE_URL_API } from '@/constants';
|
||||
|
||||
@@ -104,6 +106,22 @@ class SunoOperator {
|
||||
baseURL: BASE_URL_API
|
||||
});
|
||||
}
|
||||
|
||||
// suno/upload
|
||||
async upload(
|
||||
data: ISunoUploadRequest,
|
||||
options: {
|
||||
token: string;
|
||||
}
|
||||
): Promise<AxiosResponse<ISunoUploadResponse>> {
|
||||
return await axios.post('/suno/upload', data, {
|
||||
headers: {
|
||||
authorization: `Bearer ${options.token}`,
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
baseURL: BASE_URL_API
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export const sunoOperator = new SunoOperator();
|
||||
Reference in new issue
Block a user