d0976c9d524ee428053266757aa17c7ef1b66a12 chmalee Wed Feb 18 12:20:45 2026 -0800 Libify the api key set/revoke methods, refs #36517 diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c index 2ebe53860ac..6a80d7399fe 100644 --- src/hg/hgHubConnect/hgHubConnect.c +++ src/hg/hgHubConnect/hgHubConnect.c @@ -417,56 +417,45 @@ jsInlineF("%s", line); pipelineClose(&pl); // the 'false' below prevents a few hub-search specific jstree configuration options jsInline("hubSearchTree.init(false);"); } errCatchEnd(errCatch); if (errCatch->gotError || errCatch->gotWarning) { printf("hubCheck timed out after running for %d minute%s. Please try on a Unix command line", hubCheckTimeout / 60, hubCheckTimeout/60 > 1 ? "s" : ""); ret = 1; } errCatchFree(&errCatch); return ret; } -static char *getApiKey(char *userName) -/* Grab the already created api key if it exists */ -{ -char *tableName = cfgOptionDefault("authTableName", AUTH_TABLE_DEFAULT); -struct sqlConnection *conn = hConnectCentral(); -struct dyString *query = sqlDyStringCreate("select apiKey from %s where userName='%s'", tableName, userName); -char *apiKey = sqlQuickString(conn, dyStringCannibalize(&query)); -hDisconnectCentral(&conn); -return apiKey; -} - void printApiKeySection() { puts("