func DeletePhotos(w http.ResponseWriter, r *http.Request) {
	vars := mux.Vars(r)
	ids := vars["ids"]
	stringIDsArray := strings.Split(ids, ",")
	var array []bson.ObjectId
	log.Println(stringIDsArray)
	for _, id := range stringIDsArray {
		if bson.IsObjectIdHex(id) {
			array = append(array, bson.ObjectIdHex(id))
		}
	}
	log.Println(array)
	user, _ := database.GetUserByID(utils.GetUserObjectID(r))
	photos, err := database.GetPhotos(user.ID, array)
	if err != nil {
		utils.RespondWithJSON(w, http.StatusInternalServerError, "error", nil)
		return
	}
	var site models.Site
	for _, photo := range photos {
		if photo.SiteID != site.ID {
			site, _ = database.GetSiteByID(photo.SiteID)
		}
		if !utils.IsAuthorized(site, user) {
			utils.RespondWithJSON(w, http.StatusUnauthorized, "unauthorized", nil)
			return
		}
	}
	err = database.DeletePhotos(user.ID, array)
	if err != nil {
		utils.RespondWithJSON(w, http.StatusInternalServerError, "error", nil)
		return
	}
	err = utils.RemoveGoogleCloudPhotos(photos)
	utils.RespondWithJSON(w, http.StatusOK, "success", nil)
	return
}
DeletePhotos : remove photos from db & g cloud
package adminhandlers
import (
	"encoding/json"
	"log"
	"math"
	"net/http"
	"strings"
	"time"
	"github.com/backpulse/core/database"
	"github.com/backpulse/core/models"
	"github.com/backpulse/core/utils"
	"github.com/gorilla/mux"
	"gopkg.in/mgo.v2/bson"
)
func UpdatePhotosIndexes(w http.ResponseWriter, r *http.Request) {
	vars := mux.Vars(r)
	siteName := vars["name"]
	galleryID := vars["id"]
	site, _ := database.GetSiteByName(siteName)
	user, _ := database.GetUserByID(utils.GetUserObjectID(r))
	if !utils.IsAuthorized(site, user) {
		utils.RespondWithJSON(w, http.StatusUnauthorized, "unauthorized", nil)
		return
	}
	gallery, err := database.GetGallery(bson.ObjectIdHex(galleryID))
	if err != nil {
		utils.RespondWithJSON(w, http.StatusNotFound, "not_found", nil)
		return
	}
	if gallery.SiteID != site.ID {
		utils.RespondWithJSON(w, http.StatusUnauthorized, "unauthorized", nil)
		return
	}
	var photos []models.Photo
	err = json.NewDecoder(r.Body).Decode(&photos)
	if err != nil {
		utils.RespondWithJSON(w, http.StatusNotAcceptable, "error", nil)
		return
	}
	err = database.UpdatePhotosIndexes(gallery, photos)
	if err != nil {
		utils.RespondWithJSON(w, http.StatusInternalServerError, "error", nil)
		return
	}
	utils.RespondWithJSON(w, http.StatusOK, "success", nil)
	return
}