Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc784d70

Browse files
committed
chore: updates for PR review
1 parentbd2bb03 commitc784d70

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

‎codersdk/organizations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ func (c *Client) TemplatesByOrganization(ctx context.Context, organizationID uui
366366
typeTemplateFilterstruct {
367367
OrganizationID uuid.UUID`json:"organization_id,omitempty" format:"uuid" typescript:"-"`
368368
FilterQuerystring`json:"q,omitempty"`
369-
ExactNamestring
369+
ExactNamestring`json:"exact_name,omitempty"`
370370
}
371371

372372
// asRequestOption returns a function that can be used in (*Client).Request.

‎site/src/api/queries/templates.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ export const templatesByOrganizationId = (
4747
};
4848
};
4949

50-
exportconsttemplates=(filter:TemplateFilter={
51-
ExactName:""
52-
})=>{
50+
exportconsttemplates=(filter?:TemplateFilter)=>{
5351
return{
5452
queryKey:["templates",filter],
5553
queryFn:()=>API.getTemplates(filter),

‎site/src/api/typesGenerated.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎site/src/utils/templateAggregators.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ export const getTemplatesByTag = (
1010
all:templates,
1111
};
1212

13-
templates.forEach((template)=>{
14-
template.tags.forEach((tag)=>{
13+
for(consttemplateoftemplates){
14+
for(consttagoftemplate.tags){
1515
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- this can be undefined
1616
if(tags[tag]){
1717
tags[tag].push(template);
1818
}else{
1919
tags[tag]=[template];
2020
}
21-
});
22-
});
21+
};
22+
};
2323

2424
returntags;
2525
};
@@ -29,14 +29,14 @@ export const getTemplatesByOrg = (templates: Template[]): TemplatesByOrg => {
2929
all:templates,
3030
};
3131

32-
templates.forEach((template)=>{
32+
for(consttemplateoftemplates){
3333
constorg=template.organization_name;
3434
if(orgs[org]){
3535
orgs[org].push(template);
3636
}else{
3737
orgs[org]=[template];
3838
}
39-
});
39+
};
4040

4141
returnorgs;
4242
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp