Fixing json datetime error and add change Listing based on package
This commit is contained in:
parent
1a4c24db00
commit
55c2b2b14d
@ -15,7 +15,7 @@ params:path {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body:json {
|
body:json {
|
||||||
{}
|
{"package":1}
|
||||||
}
|
}
|
||||||
|
|
||||||
settings {
|
settings {
|
||||||
|
@ -41,9 +41,11 @@ class version:
|
|||||||
def list(self, params):
|
def list(self, params):
|
||||||
APIADDR = "/api/gebox/package/version/list"
|
APIADDR = "/api/gebox/package/version/list"
|
||||||
response = {}
|
response = {}
|
||||||
|
loggorilla.prcss(APIADDR, "Define Models")
|
||||||
|
package = params["package" ]
|
||||||
self.cursor.execute("BEGIN;")
|
self.cursor.execute("BEGIN;")
|
||||||
try:
|
try:
|
||||||
self.cursor.execute("select * from gebox_package_version;")
|
self.cursor.execute("select `id`, `package`, `version`, DATE_FORMAT(`release`, '%Y-%m-%d %H:%i:%S') AS `release` from gebox_package_version where `package` = %s;", (package,) )
|
||||||
ls = self.cursor.fetchall()
|
ls = self.cursor.fetchall()
|
||||||
loggorilla.prcss(APIADDR, "Set Response")
|
loggorilla.prcss(APIADDR, "Set Response")
|
||||||
response["status" ] = "success"
|
response["status" ] = "success"
|
||||||
@ -68,7 +70,7 @@ class version:
|
|||||||
key = params["key" ]
|
key = params["key" ]
|
||||||
self.cursor.execute("BEGIN;")
|
self.cursor.execute("BEGIN;")
|
||||||
try:
|
try:
|
||||||
self.cursor.execute("select * from gebox_package_version where `id` = %s ;", (key,) )
|
self.cursor.execute("select `id`, `package`, `version`, DATE_FORMAT(`release`, '%Y-%m-%d %H:%i:%S') AS `release` from gebox_package_version where `id` = %s ;", (key,) )
|
||||||
row = self.cursor.fetchone()
|
row = self.cursor.fetchone()
|
||||||
loggorilla.prcss(APIADDR, "Set Response")
|
loggorilla.prcss(APIADDR, "Set Response")
|
||||||
response["status" ] = "success"
|
response["status" ] = "success"
|
||||||
|
Loading…
Reference in New Issue
Block a user