Skip to content

Commit c8f5b78

Browse files
Remove duplicate link addition endpoint from LocalServerRepositoryImpl (#287)
1 parent ed81c82 commit c8f5b78

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

app/src/main/java/com/yogeshpaliyal/deepr/server/LocalServerRepositoryImpl.kt

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -211,30 +211,6 @@ open class LocalServerRepositoryImpl(
211211
}
212212
}
213213

214-
post("/api/links") {
215-
try {
216-
val request = call.receive<AddLinkRequest>()
217-
// Insert the link without tags first
218-
accountViewModel.insertAccount(
219-
request.link,
220-
request.name,
221-
false,
222-
request.tags.map { it.toDbTag() },
223-
request.notes,
224-
)
225-
call.respond(
226-
HttpStatusCode.Created,
227-
SuccessResponse("Link added successfully"),
228-
)
229-
} catch (e: Exception) {
230-
Log.e("LocalServer", "Error adding link", e)
231-
call.respond(
232-
HttpStatusCode.InternalServerError,
233-
ErrorResponse("Error adding link: ${e.message}"),
234-
)
235-
}
236-
}
237-
238214
get("/api/tags") {
239215
try {
240216
// Get all tags from the database with their IDs

0 commit comments

Comments
 (0)