File tree Expand file tree Collapse file tree
frontend/src/modules/organization/services
services/libs/data-access-layer/src/collections Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,12 +29,12 @@ export class OrganizationApiService {
2929 }
3030
3131 static async fetchMergeSuggestions ( limit : number = 20 , offset : number = 0 , query : any = { } ) {
32- const segments = getSelectedProjectGroupId ( ) ?? [ ] ;
32+ const segments = getSelectedProjectGroupId ( ) ;
3333
3434 const data = {
3535 limit,
3636 offset,
37- segments,
37+ ... ( segments ? { segments } : { } ) ,
3838 ...query ,
3939 } ;
4040
@@ -46,11 +46,12 @@ export class OrganizationApiService {
4646 }
4747
4848 static create ( data : Partial < Organization > ) {
49+ const segments = getSelectedProjectGroupId ( ) ;
4950 return authAxios . post (
5051 '/organization' ,
5152 {
5253 ...data ,
53- segments : getSelectedProjectGroupId ( ) ,
54+ ... ( segments ? { segments } : { } ) ,
5455 } ,
5556 )
5657 . then ( ( { data } ) => Promise . resolve ( data ) ) ;
Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ import { QueryOptions } from '../utils'
1616export interface ICreateCollection {
1717 categoryId : string
1818 color ?: string | null
19- description ?: string
19+ description ?: string | null
2020 imageUrl ?: string | null
2121 name : string
22- slug ?: string
22+ slug ?: string | null
2323 starred : boolean
2424 isPrivate ?: boolean
2525 ssoUserId ?: string | null
@@ -139,12 +139,12 @@ export async function createCollection(
139139 collection : ICreateCollection ,
140140) : Promise < ICollection > {
141141 const data = {
142- description : null ,
143- slug : null ,
144- logoUrl : null ,
145- imageUrl : null ,
146- color : null ,
147142 ...collection ,
143+ description : collection . description ?? null ,
144+ slug : collection . slug ?? null ,
145+ logoUrl : collection . logoUrl ?? null ,
146+ imageUrl : collection . imageUrl ?? null ,
147+ color : collection . color ?? null ,
148148 }
149149 return qx . selectOne (
150150 `
You can’t perform that action at this time.
0 commit comments