Skip to content

Commit 4ad1df0

Browse files
committed
merged
1 parent 03d338b commit 4ad1df0

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/map/image.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -105,24 +105,10 @@ pub(crate) async fn add_image(
105105
let user = user?;
106106

107107
// cast data to normal values
108-
<<<<<<< HEAD
109-
let photo_path = multipart_form_data.files.get("image").ok_or(InsignoError::new(500).debug("missing image"))?.get(0).ok_or(InsignoError::new(500).debug("missing image"))?.path.clone();
110-
let user_id = user.get_id();
111-
let id = multipart_form_data
112-
.texts
113-
.get("refers_to_id")
114-
.ok_or(InsignoError::new(500).debug("missing id"))?
115-
.get(0)
116-
.ok_or(InsignoError::new(500).debug("missing id"))?
117-
.text
118-
.parse::<i64>()
119-
.map_err(|e| InsignoError::new(500).debug(e))?;
120-
=======
121108
let photo_path = data.image.path().ok_or_else(|| InsignoError::new(500).debug("Image did not have a path"))?;
122109
let marker_id = data.refers_to_id;
123110
let user_id = user.get_id();
124111

125-
>>>>>>> main
126112
// check if user own the marker
127113
connection
128114
.run(move |conn| {
@@ -137,11 +123,7 @@ pub(crate) async fn add_image(
137123

138124
//generate unique name and convert
139125
let new_pos = unique_path(Path::new(&config.media_folder), Path::new("jpg"));
140-
<<<<<<< HEAD
141-
convert_image(&photo_path, &new_pos)?;
142-
=======
143126
convert_image(photo_path, &new_pos)?;
144-
>>>>>>> main
145127

146128
let name = new_pos
147129
.strip_prefix(&config.media_folder)

0 commit comments

Comments
 (0)