fix
This commit is contained in:
@@ -230,7 +230,7 @@ export class ResourceCategoryServiceV2 {
|
||||
ai_prompt: updates.ai_prompt,
|
||||
color: updates.color,
|
||||
is_active: updates.is_active,
|
||||
user_id: userId || this.defaultUserId,
|
||||
user_id: userId || this.getCurrentUserId(),
|
||||
verbose: false,
|
||||
json_output: true
|
||||
}
|
||||
@@ -257,7 +257,7 @@ export class ResourceCategoryServiceV2 {
|
||||
const params: CategoryDeleteRequest = {
|
||||
category_id: categoryId,
|
||||
hard_delete: hardDelete,
|
||||
user_id: userId || this.defaultUserId,
|
||||
user_id: userId || this.getCurrentUserId(),
|
||||
verbose: false,
|
||||
json_output: true
|
||||
}
|
||||
@@ -283,7 +283,7 @@ export class ResourceCategoryServiceV2 {
|
||||
try {
|
||||
const params: CategorySearchRequest = {
|
||||
query,
|
||||
user_id: this.defaultUserId,
|
||||
user_id: this.getCurrentUserId(),
|
||||
include_cloud: true,
|
||||
limit: 50,
|
||||
verbose: false,
|
||||
@@ -312,7 +312,7 @@ export class ResourceCategoryServiceV2 {
|
||||
try {
|
||||
const params: CategoryColorRequest = {
|
||||
color,
|
||||
user_id: this.defaultUserId,
|
||||
user_id: this.getCurrentUserId(),
|
||||
include_cloud: true,
|
||||
limit: 50,
|
||||
verbose: false,
|
||||
@@ -366,7 +366,7 @@ export class ResourceCategoryServiceV2 {
|
||||
try {
|
||||
const params: CategoryBatchCreateRequest = {
|
||||
categories,
|
||||
user_id: userId || this.defaultUserId,
|
||||
user_id: userId || this.getCurrentUserId(),
|
||||
verbose: false,
|
||||
json_output: true
|
||||
}
|
||||
@@ -391,7 +391,7 @@ export class ResourceCategoryServiceV2 {
|
||||
static async getCategoryCount(includeCloud = true, userId?: string): Promise<number> {
|
||||
try {
|
||||
const params: CategoryListRequest = {
|
||||
user_id: userId || this.defaultUserId,
|
||||
user_id: userId || this.getCurrentUserId(),
|
||||
include_cloud: includeCloud,
|
||||
verbose: false,
|
||||
json_output: true
|
||||
@@ -418,7 +418,7 @@ export class ResourceCategoryServiceV2 {
|
||||
try {
|
||||
const params: CategoryGetRequest = {
|
||||
category_id: categoryId,
|
||||
user_id: userId || this.defaultUserId,
|
||||
user_id: userId || this.getCurrentUserId(),
|
||||
verbose: false,
|
||||
json_output: true
|
||||
}
|
||||
@@ -444,7 +444,7 @@ export class ResourceCategoryServiceV2 {
|
||||
try {
|
||||
const params: CategoryGetRequest = {
|
||||
category_id: categoryId,
|
||||
user_id: userId || this.defaultUserId,
|
||||
user_id: userId || this.getCurrentUserId(),
|
||||
verbose: false,
|
||||
json_output: true
|
||||
}
|
||||
@@ -463,17 +463,4 @@ export class ResourceCategoryServiceV2 {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置默认用户ID
|
||||
*/
|
||||
static setDefaultUserId(userId: string) {
|
||||
this.defaultUserId = userId
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取默认用户ID
|
||||
*/
|
||||
static getDefaultUserId(): string {
|
||||
return this.defaultUserId
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user