auc: read `detail` not `message` from server
authorPaul Spooren <mail@aparcar.org>
Sun, 22 Aug 2021 21:07:14 +0000 (11:07 -1000)
committerPaul Spooren <mail@aparcar.org>
Mon, 23 Aug 2021 18:47:08 +0000 (08:47 -1000)
The server API was unified and therefore the servers response is now
`detail` rather than `message`, all found under the new endpoint
/api/v1/build.

Signed-off-by: Paul Spooren <mail@aparcar.org>
utils/auc/Makefile
utils/auc/src/auc.c

index b267a8392315249d8f45d4cf5e4afc09a0059bfc..7d5f8834431a2274420c33f2ec58e95974fedd7b 100644 (file)
@@ -5,7 +5,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=auc
-PKG_VERSION:=0.2.1
+PKG_VERSION:=0.2.2
 PKG_RELEASE:=$(AUTORELEASE)
 PKG_LICENSE:=GPL-3.0
 
index 5d3a393a5e73d8a3e8be84a3f2cdb561cd6d02ff..227cbfdb82f80daab3febda9af89f013ae489f79 100644 (file)
@@ -48,7 +48,7 @@
 #define API_JSON "json"
 #define API_JSON_EXT "." API_JSON
 #define API_PACKAGES "packages"
-#define API_REQUEST "api/build"
+#define API_REQUEST "api/v1/build"
 #define API_STATUS_QUEUED "queued"
 #define API_STATUS_STARTED "started"
 #define API_STORE "store"
@@ -236,7 +236,7 @@ enum {
        TARGET_ENQUEUED_AT,
        TARGET_IMAGE_PREFIX,
        TARGET_IMAGES,
-       TARGET_MESSAGE,
+       TARGET_DETAIL,
        TARGET_MANIFEST,
        TARGET_METADATA_VERSION,
        TARGET_REQUEST_HASH,
@@ -263,7 +263,7 @@ static const struct blobmsg_policy target_policy[__TARGET_MAX] = {
        [TARGET_IMAGE_PREFIX] = { .name = "image_prefix", .type = BLOBMSG_TYPE_STRING },
        [TARGET_IMAGES] = { .name = "images", .type = BLOBMSG_TYPE_ARRAY },
        [TARGET_MANIFEST] = { .name = "manifest", .type = BLOBMSG_TYPE_TABLE },
-       [TARGET_MESSAGE] = { .name = "message", .type = BLOBMSG_TYPE_STRING },
+       [TARGET_DETAIL] = { .name = "detail", .type = BLOBMSG_TYPE_STRING },
        [TARGET_METADATA_VERSION] = { .name = "metadata_version", .type = BLOBMSG_TYPE_INT32 },
        [TARGET_REQUEST_HASH] = { .name = "request_hash", .type = BLOBMSG_TYPE_STRING },
        [TARGET_SOURCE_DATE_EPOCH] = { .name = "source_date_epoch", .type = BLOBMSG_TYPE_STRING },
@@ -1903,8 +1903,8 @@ freebranches:
            )
                fputs(blobmsg_get_string(tb[TARGET_STDERR]), stderr);
 
-       if (tb[TARGET_MESSAGE]) {
-               fputs(blobmsg_get_string(tb[TARGET_MESSAGE]), stderr);
+       if (tb[TARGET_DETAIL]) {
+               fputs(blobmsg_get_string(tb[TARGET_DETAIL]), stderr);
                fputc('\n', stderr);
        }