fix
This commit is contained in:
@@ -230,7 +230,7 @@ export class ResourceCategoryServiceV2 {
|
|||||||
ai_prompt: updates.ai_prompt,
|
ai_prompt: updates.ai_prompt,
|
||||||
color: updates.color,
|
color: updates.color,
|
||||||
is_active: updates.is_active,
|
is_active: updates.is_active,
|
||||||
user_id: userId || this.defaultUserId,
|
user_id: userId || this.getCurrentUserId(),
|
||||||
verbose: false,
|
verbose: false,
|
||||||
json_output: true
|
json_output: true
|
||||||
}
|
}
|
||||||
@@ -257,7 +257,7 @@ export class ResourceCategoryServiceV2 {
|
|||||||
const params: CategoryDeleteRequest = {
|
const params: CategoryDeleteRequest = {
|
||||||
category_id: categoryId,
|
category_id: categoryId,
|
||||||
hard_delete: hardDelete,
|
hard_delete: hardDelete,
|
||||||
user_id: userId || this.defaultUserId,
|
user_id: userId || this.getCurrentUserId(),
|
||||||
verbose: false,
|
verbose: false,
|
||||||
json_output: true
|
json_output: true
|
||||||
}
|
}
|
||||||
@@ -283,7 +283,7 @@ export class ResourceCategoryServiceV2 {
|
|||||||
try {
|
try {
|
||||||
const params: CategorySearchRequest = {
|
const params: CategorySearchRequest = {
|
||||||
query,
|
query,
|
||||||
user_id: this.defaultUserId,
|
user_id: this.getCurrentUserId(),
|
||||||
include_cloud: true,
|
include_cloud: true,
|
||||||
limit: 50,
|
limit: 50,
|
||||||
verbose: false,
|
verbose: false,
|
||||||
@@ -312,7 +312,7 @@ export class ResourceCategoryServiceV2 {
|
|||||||
try {
|
try {
|
||||||
const params: CategoryColorRequest = {
|
const params: CategoryColorRequest = {
|
||||||
color,
|
color,
|
||||||
user_id: this.defaultUserId,
|
user_id: this.getCurrentUserId(),
|
||||||
include_cloud: true,
|
include_cloud: true,
|
||||||
limit: 50,
|
limit: 50,
|
||||||
verbose: false,
|
verbose: false,
|
||||||
@@ -366,7 +366,7 @@ export class ResourceCategoryServiceV2 {
|
|||||||
try {
|
try {
|
||||||
const params: CategoryBatchCreateRequest = {
|
const params: CategoryBatchCreateRequest = {
|
||||||
categories,
|
categories,
|
||||||
user_id: userId || this.defaultUserId,
|
user_id: userId || this.getCurrentUserId(),
|
||||||
verbose: false,
|
verbose: false,
|
||||||
json_output: true
|
json_output: true
|
||||||
}
|
}
|
||||||
@@ -391,7 +391,7 @@ export class ResourceCategoryServiceV2 {
|
|||||||
static async getCategoryCount(includeCloud = true, userId?: string): Promise<number> {
|
static async getCategoryCount(includeCloud = true, userId?: string): Promise<number> {
|
||||||
try {
|
try {
|
||||||
const params: CategoryListRequest = {
|
const params: CategoryListRequest = {
|
||||||
user_id: userId || this.defaultUserId,
|
user_id: userId || this.getCurrentUserId(),
|
||||||
include_cloud: includeCloud,
|
include_cloud: includeCloud,
|
||||||
verbose: false,
|
verbose: false,
|
||||||
json_output: true
|
json_output: true
|
||||||
@@ -418,7 +418,7 @@ export class ResourceCategoryServiceV2 {
|
|||||||
try {
|
try {
|
||||||
const params: CategoryGetRequest = {
|
const params: CategoryGetRequest = {
|
||||||
category_id: categoryId,
|
category_id: categoryId,
|
||||||
user_id: userId || this.defaultUserId,
|
user_id: userId || this.getCurrentUserId(),
|
||||||
verbose: false,
|
verbose: false,
|
||||||
json_output: true
|
json_output: true
|
||||||
}
|
}
|
||||||
@@ -444,7 +444,7 @@ export class ResourceCategoryServiceV2 {
|
|||||||
try {
|
try {
|
||||||
const params: CategoryGetRequest = {
|
const params: CategoryGetRequest = {
|
||||||
category_id: categoryId,
|
category_id: categoryId,
|
||||||
user_id: userId || this.defaultUserId,
|
user_id: userId || this.getCurrentUserId(),
|
||||||
verbose: false,
|
verbose: false,
|
||||||
json_output: true
|
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