You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/cloud-api/projects.js
+15-10Lines changed: 15 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,8 @@ import { getProjectsClient } from '../clients.js';
26
26
* @function listProjects
27
27
* @returns {Promise<Array<{id: string}>>} A promise that resolves to an array of project objects, each with an 'id' property. Returns an empty array on error.
28
28
*/
29
-
exportasyncfunctionlistProjects(){
30
-
constclient=awaitgetProjectsClient();
29
+
exportasyncfunctionlistProjects(accessToken){
30
+
constclient=awaitgetProjectsClient(accessToken);
31
31
try{
32
32
const[projects]=awaitclient.searchProjects();
33
33
returnprojects.map((project)=>({
@@ -71,8 +71,8 @@ export function generateProjectId() {
71
71
* @param {string} [parent] - Optional. The resource name of the parent under which the project is to be created. e.g., "organizations/123" or "folders/456".
72
72
* @returns {Promise<{projectId: string}|null>} A promise that resolves to an object containing the new project's ID.
@@ -112,10 +112,14 @@ export async function createProject(projectId, parent) {
112
112
* @param {string} [parent] - Optional. The resource name of the parent under which the project is to be created. e.g., "organizations/123" or "folders/456".
113
113
* @returns {Promise<{projectId: string, billingMessage: string}>} A promise that resolves to an object containing the project ID and a billing status message.
0 commit comments