From 322c3ae60f739cfc8db573e5e65a4263da391b86 Mon Sep 17 00:00:00 2001 From: matu6968 Date: Sun, 10 Nov 2024 23:30:29 +0100 Subject: [PATCH] Add To edit app details --- To-edit-app-details.md | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 To-edit-app-details.md diff --git a/To-edit-app-details.md b/To-edit-app-details.md new file mode 100644 index 0000000..8c3e774 --- /dev/null +++ b/To-edit-app-details.md @@ -0,0 +1,57 @@ +# To edit app details: + +## HTTP request type: `POST` + +## Authorization required: Yes (Header: Bearer auth, key is located in .env file) + +## Endpoint: `/editapp` + +## Parameters required: +``` +Multipart body: + +1. Application ID from where to change it's details (footer, required): id: 784875887587 +2. New Application Version (footer): ver: 1 +3. New Application Description (footer): info: thisisatestedit +4. New Application name (footer): name: App Market Manager +5. New Application File (footer): file: [path to file] +5. New Application Path (footer): customPath: [path to file] +``` + +### Output: + +If it is successful: +``` +{ + "name": "App Market Manager", + "ver": "1", + "appid": "784875887587", + "info": "thisisatestedit", + "pub": "matu6968", + "path": "/uploads/App_Market_Manager/index.js" +} +``` +If there is no token or a invalid token: +``` +Unauthorized +``` +If there is no app ID specified: +``` +App ID is required +``` +If there is a invalid app ID specified: +``` +App not found +``` +If there is a problem while saving the uploaded file: (likely cause is directory where the binary is located is set to read only) +``` +Failed to save file +``` +If there is a problem while saving apps.json onto the host: (likely cause is directory where the binary is located is set to read only) +``` +Failed to save app data +``` +If there is invalid multipart body: +``` +Invalid form data +``` \ No newline at end of file