Skip to content

Commit

Permalink
fix(session): fix some issues caused by user session design.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinin committed Aug 9, 2024
1 parent 7746e7c commit a2e2850
Show file tree
Hide file tree
Showing 52 changed files with 618 additions and 819 deletions.
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -252,5 +252,6 @@
<PackageVersion Include="Tencent.QCloud.Cos.Sdk" Version="5.4.37" />
<PackageVersion Include="TencentCloudSDK" Version="3.0.712" />
<PackageVersion Include="Yarp.ReverseProxy" Version="2.1.0" />
<PackageVersion Include="Yarp.Telemetry.Consumption" Version="2.1.0" />
</ItemGroup>
</Project>
43 changes: 10 additions & 33 deletions apps/vue/src/api/caching-management/cache/index.ts
Original file line number Diff line number Diff line change
@@ -1,56 +1,33 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import {
CacheKeys,
CacheValue,
CacheRefreshRequest,
GetCacheKeysRequest,
} from './model';

const remoteServiceName = 'CachingManagement';
const controllerName = 'Cache';

export const getKeys = (input: GetCacheKeysRequest) => {
return defAbpHttp.request<CacheKeys>({
service: remoteServiceName,
controller: controllerName,
action: 'GetKeysAsync',
params: {
input: input,
},
return defHttp.get<CacheKeys>({
url: '/api/caching-management/cache',
params: input,
});
};

export const getValue = (key: string) => {
return defAbpHttp.request<CacheValue>({
service: remoteServiceName,
controller: controllerName,
action: 'GetValueAsync',
params: {
input: {
key: key,
}
},
return defHttp.get<CacheValue>({
url: `/api/caching-management/cache?key=${key}`,
});
};

export const refresh = (input: CacheRefreshRequest) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'RefreshAsync',
return defHttp.put<void>({
url: `/api/caching-management/cache/refresh`,
data: input,
});
};

export const remove = (key: string) => {
return defAbpHttp.request<void>({
service: remoteServiceName,
controller: controllerName,
action: 'RemoveAsync',
params: {
input: {
key: key,
}
},
return defHttp.delete<void>({
url: `/api/caching-management/cache?key=${key}`,
});
};
6 changes: 3 additions & 3 deletions apps/vue/src/api/logging/logs/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import { Log, GetLogPagedRequest } from './model';

export const get = (id: string) => {
return defAbpHttp.get<Log>({
return defHttp.get<Log>({
url: `/api/auditing/logging/${id}`,
});
};

export const getList = (input: GetLogPagedRequest) => {
return defAbpHttp.get<PagedResultDto<Log>>({
return defHttp.get<PagedResultDto<Log>>({
url: '/api/auditing/logging',
params: input,
});
Expand Down
71 changes: 6 additions & 65 deletions apps/vue/src/api/openiddict/open-iddict-application/index.ts
Original file line number Diff line number Diff line change
@@ -1,99 +1,40 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import {
OpenIddictApplicationDto,
OpenIddictApplicationGetListInput,
OpenIddictApplicationCreateDto,
OpenIddictApplicationUpdateDto,
} from './model';

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

export const get = (id: string) => {
return defAbpHttp.get<OpenIddictApplicationDto>({
return defHttp.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 getList = (input: OpenIddictApplicationGetListInput) => {
return defAbpHttp.get<PagedResultDto<OpenIddictApplicationDto>>({
return defHttp.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 create = (input: OpenIddictApplicationCreateDto) => {
return defAbpHttp.post<OpenIddictApplicationDto>({
return defHttp.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 update = (id: string, input: OpenIddictApplicationUpdateDto) => {
return defAbpHttp.put<OpenIddictApplicationDto>({
return defHttp.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 deleteById = (id: string) => {
return defAbpHttp.delete<void>({
return defHttp.delete<void>({
url: `/api/openiddict/applications/${id}`,
});
};
44 changes: 4 additions & 40 deletions apps/vue/src/api/openiddict/open-iddict-authorization/index.ts
Original file line number Diff line number Diff line change
@@ -1,56 +1,20 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import { OpenIddictAuthorizationDto, OpenIddictAuthorizationGetListInput, } from './model';

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

export const deleteById = (id: string) => {
return defAbpHttp.delete<void>({
return defHttp.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 get = (id: string) => {
return defAbpHttp.get<OpenIddictAuthorizationDto>({
return defHttp.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 getList = (input: OpenIddictAuthorizationGetListInput) => {
return defAbpHttp.get<PagedResultDto<OpenIddictAuthorizationDto>>({
return defHttp.get<PagedResultDto<OpenIddictAuthorizationDto>>({
url: '/api/openiddict/authorizations',
params: input,
});
Expand Down
71 changes: 6 additions & 65 deletions apps/vue/src/api/openiddict/open-iddict-scope/index.ts
Original file line number Diff line number Diff line change
@@ -1,98 +1,39 @@
import { defAbpHttp } from '/@/utils/http/abp';
import { defHttp } from '/@/utils/http/axios';
import {
OpenIddictScopeCreateDto,
OpenIddictScopeDto,
OpenIddictScopeGetListInput,
OpenIddictScopeUpdateDto,
} from './model';

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

export const create = (input: OpenIddictScopeCreateDto) => {
return defAbpHttp.post<OpenIddictScopeDto>({
return defHttp.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 deleteById = (id: string) => {
return defAbpHttp.delete<void>({
return defHttp.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 get = (id: string) => {
return defAbpHttp.get<OpenIddictScopeDto>({
return defHttp.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 getList = (input: OpenIddictScopeGetListInput) => {
return defAbpHttp.get<PagedResultDto<OpenIddictScopeDto>>({
return defHttp.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 update = (id: string, input: OpenIddictScopeUpdateDto) => {
return defAbpHttp.put<OpenIddictScopeDto>({
return defHttp.put<OpenIddictScopeDto>({
url: `/api/openiddict/scopes/${id}`,
data: input,
});
Expand Down
Loading

0 comments on commit a2e2850

Please sign in to comment.