Integrate Oudelaa backend features, security, tests, and deployment updates
هذا الالتزام موجود في:
@@ -7155,7 +7155,185 @@
|
||||
"pm.expect(json.audioUrl).to.exist;",
|
||||
"pm.expect(json.mimeType).to.exist;",
|
||||
"pm.expect(json.sizeBytes).to.be.a('number');",
|
||||
"pm.environment.set('generatedMusicUrl', json.audioUrl);"
|
||||
"pm.environment.set('generatedMusicUrl', json.audioUrl);",
|
||||
"if (json.archiveItemId) { pm.environment.set('aiArchiveItemId', json.archiveItemId); }"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Get My AI Music Archive",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/media/ai/music/archive?page={{aiArchivePage}}&limit={{aiArchiveLimit}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.items).to.be.an('array');",
|
||||
"pm.expect(json.pagination).to.have.property('hasMore');",
|
||||
"if (json.items.length > 0) { pm.environment.set('aiArchiveItemId', json.items[0].id); }"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Get AI Music Archive Item",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/media/ai/music/archive/{{aiArchiveItemId}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.id).to.eql(pm.environment.get('aiArchiveItemId'));",
|
||||
"pm.expect(json.audioUrl).to.exist;"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Rename AI Music Archive Item",
|
||||
"request": {
|
||||
"method": "PATCH",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/media/ai/music/archive/{{aiArchiveItemId}}",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"title\": \"{{aiArchiveNewTitle}}\"\n}"
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.title).to.eql(pm.environment.get('aiArchiveNewTitle'));"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Share AI Music Archive Item",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/media/ai/music/archive/{{aiArchiveItemId}}/share"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 201 or 200', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.shareUrl).to.exist;",
|
||||
"pm.expect(json.audioUrl).to.exist;"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Share AI Music Archive Item To Feed",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
},
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/media/ai/music/archive/{{aiArchiveItemId}}/share-to-feed",
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"content\": \"{{aiArchiveShareContent}}\"\n}"
|
||||
}
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 201 or 200', function () { pm.expect(pm.response.code).to.be.oneOf([200, 201]); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.audioUrl).to.exist;",
|
||||
"pm.environment.set('ownPostId', json.id || json._id);"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Delete AI Music Archive Item",
|
||||
"request": {
|
||||
"method": "DELETE",
|
||||
"header": [
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{accessToken}}"
|
||||
}
|
||||
],
|
||||
"url": "{{baseUrl}}/media/ai/music/archive/{{aiArchiveItemId}}"
|
||||
},
|
||||
"event": [
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
"pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
|
||||
"const json = pm.response.json();",
|
||||
"pm.expect(json.message).to.eql('Archive item deleted');"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -10818,6 +10996,26 @@
|
||||
{
|
||||
"key": "socketAccessToken",
|
||||
"value": "{{accessToken}}"
|
||||
},
|
||||
{
|
||||
"key": "aiArchivePage",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"key": "aiArchiveLimit",
|
||||
"value": "20"
|
||||
},
|
||||
{
|
||||
"key": "aiArchiveItemId",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"key": "aiArchiveNewTitle",
|
||||
"value": "Renamed AI Music"
|
||||
},
|
||||
{
|
||||
"key": "aiArchiveShareContent",
|
||||
"value": "Shared from my AI music archive"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم