File

src/outbound/auth-api/auth-api.controller.ts

Prefix

/realm

Index

Methods

Methods

getRealms
getRealms()
Decorators :
@Get('')
@ApiResponse({status: undefined})
Returns : any
postRealms
postRealms(body: RealmDto)
Decorators :
@Post()
@ApiResponse({status: undefined})
Parameters :
Name Type Optional
body RealmDto No
Returns : any
putRealm
putRealm(realmName: string, body: RealmEnabledDto)
Decorators :
@Put('enabled/:realmName')
@ApiResponse({status: undefined})
Parameters :
Name Type Optional
realmName string No
body RealmEnabledDto No
Returns : any
import {
  Body,
  Controller,
  Get,
  HttpStatus,
  Param,
  Post,
  Put,
  Req,
} from '@nestjs/common';
import { ApiResponse, ApiTags } from '@nestjs/swagger';
import { AuthApiService } from './auth-api.service';
import { RealmDto, RealmEnabledDto } from './dto/realm.dto';

@ApiTags('realm')
@Controller('/realm')
export class AuthApiController {
  constructor(private readonly authApiService: AuthApiService) {}
  @Post()
  @ApiResponse({ status: HttpStatus.OK })
  postRealms(@Body() body: RealmDto) {
    return this.authApiService.postRealms(body);
  }

  @Get('')
  @ApiResponse({ status: HttpStatus.OK })
  getRealms() {
    return this.authApiService.getRealms();
  }

  @Put('enabled/:realmName')
  @ApiResponse({ status: HttpStatus.OK })
  putRealm(
    @Param(':realmName') realmName: string,
    @Body() body: RealmEnabledDto,
  ) {
    return this.authApiService.putRealm(realmName, body);
  }
}

results matching ""

    No results matching ""