@@ -1070,6 +1070,140 @@ paths:
10701070 message :
10711071 type : string
10721072 example : Reset token is correct.
1073+ /profile/images :
1074+ post :
1075+ tags :
1076+ - Profile
1077+ summary : Add image to profile
1078+ description : The image must be passed in the `file[]` in form-data
1079+ operationId : addImage
1080+ security :
1081+ - bearerAuth : []
1082+ parameters :
1083+ - in : path
1084+ name : is_primary
1085+ schema :
1086+ type : boolean
1087+ required : true
1088+ example : true
1089+ description : Is the image the primary profile image
1090+ requestBody :
1091+ content :
1092+ image/png :
1093+ schema :
1094+ type : string
1095+ format : binary
1096+ responses :
1097+ " 409 " :
1098+ $ref : " #/components/responses/BadRequest"
1099+ " 200 " :
1100+ description : Image added successfully
1101+ content :
1102+ application/json :
1103+ schema :
1104+ type : object
1105+ properties :
1106+ success :
1107+ type : boolean
1108+ description : If the request is a success
1109+ example : true
1110+ code :
1111+ type : integer
1112+ description : The status code
1113+ example : 200
1114+ image :
1115+ type : string
1116+ example : https://i.imgur.com/Zv9DnWh.png
1117+ get :
1118+ summary : Get all user images
1119+ operationId : getAllUserImages
1120+ security :
1121+ - bearerAuth : [ ]
1122+ tags :
1123+ - Profile
1124+ responses :
1125+ " 200 " :
1126+ description : Returned list of user images
1127+ content :
1128+ application/json :
1129+ schema :
1130+ type : array
1131+ items :
1132+ $ref : ' #/components/schemas/Image'
1133+ /profile/images/{image_id} :
1134+ put :
1135+ tags :
1136+ - Profile
1137+ summary : Edit which image is the primary one
1138+ description : This will change the previous primary image if it exists to the passed id
1139+ operationId : editPrimaryImage
1140+ security :
1141+ - bearerAuth : []
1142+ parameters :
1143+ - name : image_id
1144+ in : path
1145+ required : true
1146+ description : The id of the image to become primary
1147+ schema :
1148+ type : string
1149+ responses :
1150+ " 409 " :
1151+ $ref : " #/components/responses/BadRequest"
1152+ " 404 " :
1153+ $ref : " #/components/responses/NotFound"
1154+ " 200 " :
1155+ description : Profile picture successfully modified
1156+ content :
1157+ application/json :
1158+ schema :
1159+ type : object
1160+ properties :
1161+ success :
1162+ type : boolean
1163+ description : If the request is a success
1164+ example : true
1165+ code :
1166+ type : integer
1167+ description : The status code
1168+ example : 200
1169+ message :
1170+ type : string
1171+ example : Profile picture successfully modified
1172+ delete :
1173+ tags :
1174+ - Profile
1175+ summary : Delete an image
1176+ operationId : deleteImage
1177+ security :
1178+ - bearerAuth : []
1179+ parameters :
1180+ - name : image_id
1181+ in : path
1182+ required : true
1183+ description : The id of the image to be delete
1184+ schema :
1185+ type : string
1186+ responses :
1187+ " 404 " :
1188+ $ref : " #/components/responses/NotFound"
1189+ " 200 " :
1190+ description : Profile picture successfully modified
1191+ content :
1192+ application/json :
1193+ schema :
1194+ type : object
1195+ properties :
1196+ success :
1197+ type : boolean
1198+ description : If the request is a success
1199+ example : true
1200+ code :
1201+ type : integer
1202+ description : The status code
1203+ example : 200
1204+ message :
1205+ type : string
1206+ example : Image successfully deleted.
10731207
10741208
10751209servers :
0 commit comments