Skip to content

Commit

Permalink
Merge pull request #882 from colinin/fix-openiddict
Browse files Browse the repository at this point in the history
Fix about openiddict
  • Loading branch information
colinin authored Sep 25, 2023
2 parents 2f1d515 + 3bf710f commit 40fe0d8
Show file tree
Hide file tree
Showing 40 changed files with 999 additions and 270 deletions.
118 changes: 76 additions & 42 deletions apps/vue/src/api/openiddict/open-iddict-application/index.ts
Original file line number Diff line number Diff line change
@@ -1,65 +1,99 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { OpenIddictApplicationDto,OpenIddictApplicationGetListInput, OpenIddictApplicationCreateDto, OpenIddictApplicationUpdateDto, } from './model';
import {
OpenIddictApplicationDto,
OpenIddictApplicationGetListInput,
OpenIddictApplicationCreateDto,
OpenIddictApplicationUpdateDto,
} from './model';

const remoteServiceName = 'AbpOpenIddict';
const controllerName = 'OpenIddictApplication';
// export const GetAsyncById = (id: string) => {
// return defAbpHttp.request<OpenIddictApplicationDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'GetAsync',
// uniqueName: 'GetAsyncById',
// params: {
// id: id,
// },
// });
// };

export const GetAsyncById = (id: string) => {
return defAbpHttp.request<OpenIddictApplicationDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetAsync',
uniqueName: 'GetAsyncById',
params: {
id: id,
},
return defAbpHttp.get<OpenIddictApplicationDto>({
url: `/api/openiddict/applications/${id}`,
});
};

// export const GetListAsyncByInput = (input: OpenIddictApplicationGetListInput) => {
// return defAbpHttp.pagedRequest<OpenIddictApplicationDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'GetListAsync',
// uniqueName: 'GetListAsyncByInput',
// params: {
// input: input,
// },
// });
// };

export const GetListAsyncByInput = (input: OpenIddictApplicationGetListInput) => {
return defAbpHttp.pagedRequest<OpenIddictApplicationDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetListAsync',
uniqueName: 'GetListAsyncByInput',
params: {
input: input,
},
return defAbpHttp.get<PagedResultDto<OpenIddictApplicationDto>>({
url: '/api/openiddict/applications',
params: input,
});
};

// export const CreateAsyncByInput = (input: OpenIddictApplicationCreateDto) => {
// return defAbpHttp.request<OpenIddictApplicationDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'CreateAsync',
// uniqueName: 'CreateAsyncByInput',
// data: input,
// });
// };

export const CreateAsyncByInput = (input: OpenIddictApplicationCreateDto) => {
return defAbpHttp.request<OpenIddictApplicationDto>({
service: remoteServiceName,
controller: controllerName,
action: 'CreateAsync',
uniqueName: 'CreateAsyncByInput',
return defAbpHttp.post<OpenIddictApplicationDto>({
url: '/api/openiddict/applications',
data: input,
});
};

// export const UpdateAsyncByIdAndInput = (id: string, input: OpenIddictApplicationUpdateDto) => {
// return defAbpHttp.request<OpenIddictApplicationDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'UpdateAsync',
// uniqueName: 'UpdateAsyncByIdAndInput',
// params: {
// id: id,
// },
// data: input,
// });
// };

export const UpdateAsyncByIdAndInput = (id: string, input: OpenIddictApplicationUpdateDto) => {
return defAbpHttp.request<OpenIddictApplicationDto>({
service: remoteServiceName,
controller: controllerName,
action: 'UpdateAsync',
uniqueName: 'UpdateAsyncByIdAndInput',
params: {
id: id,
},
return defAbpHttp.put<OpenIddictApplicationDto>({
url: `/api/openiddict/applications/${id}`,
data: input,
});
};

// export const DeleteAsyncById = (id: string) => {
// return defAbpHttp.request<void>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'DeleteAsync',
// uniqueName: 'DeleteAsyncById',
// params: {
// id: id,
// },
// });
// };

export const DeleteAsyncById = (id: string) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'DeleteAsync',
uniqueName: 'DeleteAsyncById',
params: {
id: id,
},
return defAbpHttp.delete<void>({
url: `/api/openiddict/applications/${id}`,
});
};

};
73 changes: 44 additions & 29 deletions apps/vue/src/api/openiddict/open-iddict-authorization/index.ts
Original file line number Diff line number Diff line change
@@ -1,42 +1,57 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { OpenIddictAuthorizationDto,OpenIddictAuthorizationGetListInput, } from './model';
import { OpenIddictAuthorizationDto, OpenIddictAuthorizationGetListInput, } from './model';

const remoteServiceName = 'AbpOpenIddict';
const controllerName = 'OpenIddictAuthorization';
// export const DeleteAsyncById = (id: string) => {
// return defAbpHttp.request<void>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'DeleteAsync',
// uniqueName: 'DeleteAsyncById',
// params: {
// id: id,
// },
// });
// };

export const DeleteAsyncById = (id: string) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'DeleteAsync',
uniqueName: 'DeleteAsyncById',
params: {
id: id,
},
return defAbpHttp.delete<void>({
url: `/api/openiddict/authorizations/${id}`,
});
};

// export const GetAsyncById = (id: string) => {
// return defAbpHttp.request<OpenIddictAuthorizationDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'GetAsync',
// uniqueName: 'GetAsyncById',
// params: {
// id: id,
// },
// });
// };

export const GetAsyncById = (id: string) => {
return defAbpHttp.request<OpenIddictAuthorizationDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetAsync',
uniqueName: 'GetAsyncById',
params: {
id: id,
},
return defAbpHttp.get<OpenIddictAuthorizationDto>({
url: `/api/openiddict/authorizations/${id}`,
});
};

// export const GetListAsyncByInput = (input: OpenIddictAuthorizationGetListInput) => {
// return defAbpHttp.pagedRequest<OpenIddictAuthorizationDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'GetListAsync',
// uniqueName: 'GetListAsyncByInput',
// params: {
// input: input,
// },
// });
// };

export const GetListAsyncByInput = (input: OpenIddictAuthorizationGetListInput) => {
return defAbpHttp.pagedRequest<OpenIddictAuthorizationDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetListAsync',
uniqueName: 'GetListAsyncByInput',
params: {
input: input,
},
return defAbpHttp.get<PagedResultDto<OpenIddictAuthorizationDto>>({
url: '/api/openiddict/authorizations',
params: input,
});
};

};
118 changes: 76 additions & 42 deletions apps/vue/src/api/openiddict/open-iddict-scope/index.ts
Original file line number Diff line number Diff line change
@@ -1,65 +1,99 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { OpenIddictScopeCreateDto, OpenIddictScopeDto,OpenIddictScopeGetListInput, OpenIddictScopeUpdateDto, } from './model';
import {
OpenIddictScopeCreateDto,
OpenIddictScopeDto,
OpenIddictScopeGetListInput,
OpenIddictScopeUpdateDto,
} from './model';

const remoteServiceName = 'AbpOpenIddict';
const controllerName = 'OpenIddictScope';
// export const CreateAsyncByInput = (input: OpenIddictScopeCreateDto) => {
// return defAbpHttp.request<OpenIddictScopeDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'CreateAsync',
// uniqueName: 'CreateAsyncByInput',
// data: input,
// });
// };

export const CreateAsyncByInput = (input: OpenIddictScopeCreateDto) => {
return defAbpHttp.request<OpenIddictScopeDto>({
service: remoteServiceName,
controller: controllerName,
action: 'CreateAsync',
uniqueName: 'CreateAsyncByInput',
return defAbpHttp.post<OpenIddictScopeDto>({
url: '/api/openiddict/scopes',
data: input,
});
};

// export const DeleteAsyncById = (id: string) => {
// return defAbpHttp.request<void>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'DeleteAsync',
// uniqueName: 'DeleteAsyncById',
// params: {
// id: id,
// },
// });
// };

export const DeleteAsyncById = (id: string) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'DeleteAsync',
uniqueName: 'DeleteAsyncById',
params: {
id: id,
},
return defAbpHttp.delete<void>({
url: `/api/openiddict/scopes/${id}`
});
};

// export const GetAsyncById = (id: string) => {
// return defAbpHttp.request<OpenIddictScopeDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'GetAsync',
// uniqueName: 'GetAsyncById',
// params: {
// id: id,
// },
// });
// };

export const GetAsyncById = (id: string) => {
return defAbpHttp.request<OpenIddictScopeDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetAsync',
uniqueName: 'GetAsyncById',
params: {
id: id,
},
return defAbpHttp.get<OpenIddictScopeDto>({
url: `/api/openiddict/scopes/${id}`
});
};

// export const GetListAsyncByInput = (input: OpenIddictScopeGetListInput) => {
// return defAbpHttp.pagedRequest<OpenIddictScopeDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'GetListAsync',
// uniqueName: 'GetListAsyncByInput',
// params: {
// input: input,
// },
// });
// };

export const GetListAsyncByInput = (input: OpenIddictScopeGetListInput) => {
return defAbpHttp.pagedRequest<OpenIddictScopeDto>({
service: remoteServiceName,
controller: controllerName,
action: 'GetListAsync',
uniqueName: 'GetListAsyncByInput',
params: {
input: input,
},
return defAbpHttp.get<PagedResultDto<OpenIddictScopeDto>>({
url: '/api/openiddict/scopes',
params: input,
});
};

// export const UpdateAsyncByIdAndInput = (id: string, input: OpenIddictScopeUpdateDto) => {
// return defAbpHttp.request<OpenIddictScopeDto>({
// service: remoteServiceName,
// controller: controllerName,
// action: 'UpdateAsync',
// uniqueName: 'UpdateAsyncByIdAndInput',
// params: {
// id: id,
// },
// data: input,
// });
// };

export const UpdateAsyncByIdAndInput = (id: string, input: OpenIddictScopeUpdateDto) => {
return defAbpHttp.request<OpenIddictScopeDto>({
service: remoteServiceName,
controller: controllerName,
action: 'UpdateAsync',
uniqueName: 'UpdateAsyncByIdAndInput',
params: {
id: id,
},
return defAbpHttp.put<OpenIddictScopeDto>({
url: `/api/openiddict/scopes/${id}`,
data: input,
});
};

};
Loading

0 comments on commit 40fe0d8

Please sign in to comment.