Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Commit

Permalink
bug fix - finally
Browse files Browse the repository at this point in the history
  • Loading branch information
fulton committed Feb 11, 2020
1 parent 9bbbb25 commit 0ebd5c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/andromeda/araserver/Run.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ object Run : NanoHTTPD(Port().main()) {
when {
sessionUri.startsWith("/news/us") -> main2 = NewsCache.usNews
sessionUri.startsWith("/postupdate/") ->UpdateDB().arrayUpdate(sessionUri,
session.parameters["data"]?.get(0)!!
session.headers["data"]!!
)
sessionUri.startsWith("/news/tech") -> main2 = NewsCache.tech
sessionUri.startsWith("/news/money") -> main2 = NewsCache.money
Expand Down Expand Up @@ -74,7 +74,7 @@ object Run : NanoHTTPD(Port().main()) {
NewDevice().main(sessionUri)
}
sessionUri.startsWith("/newdoc/")->{
NewDoc().main(sessionUri, session.parameters["data"]?.get(0)!!)
NewDoc().main(sessionUri, session.headers["data"]!!)
}
sessionUri.startsWith("/getforcache")-> main2 = GetData().main()
sessionUri.startsWith("/math") -> main2 =
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/andromeda/araserver/pages/UpdateDB.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class UpdateDB {
return "ok"
}
fun fromJson(jsontxt: String?): Any {
println(jsontxt)
val gson = Gson()
return gson.fromJson(jsontxt, object : TypeToken<Any>(){}.type)
}
Expand Down

0 comments on commit 0ebd5c6

Please sign in to comment.