-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modify: 修改第三方 oss api 的模块名称为 oss-middleware
- Loading branch information
Showing
7 changed files
with
43 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Get, Controller } from '@nestjs/common'; | ||
|
||
import { RequireAuthority, RequireLogin } from '@/modules/auth/auth.decorator'; | ||
|
||
import { OSSMiddlewareService } from './oss-middleware.service'; | ||
import { OSSMiddlewareType } from './oss-middleware.type'; | ||
|
||
@Controller('oss-middleware') | ||
@RequireLogin() | ||
export class OSSMiddlewareController { | ||
constructor(protected service: OSSMiddlewareService) {} | ||
|
||
/** | ||
* 获取阿里 OSS 上传信息 | ||
*/ | ||
@Get('getAliOSSInfo') | ||
@RequireAuthority('oss-middleware:getAliOSSInfo') | ||
async getAliOSSInfo(): Promise<OSSMiddlewareType> { | ||
return this.service.getSignature(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Module } from '@nestjs/common'; | ||
|
||
import { OSSMiddlewareController } from './oss-middleware.controller'; | ||
import { OSSMiddlewareService } from './oss-middleware.service'; | ||
|
||
@Module({ | ||
imports: [], | ||
controllers: [OSSMiddlewareController], | ||
providers: [OSSMiddlewareService], | ||
exports: [], | ||
}) | ||
export class OSSMiddlewareModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/modules/restful/oss/oss.type.ts → ...odules/restful/oss/oss-middleware.type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export class OSSType { | ||
export class OSSMiddlewareType { | ||
expire: string; | ||
|
||
policy: string; | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.