Skip to content

Commit

Permalink
Merge pull request #1706 from gettakaro/main-promotion
Browse files Browse the repository at this point in the history
  • Loading branch information
niekcandaele authored Oct 22, 2024
2 parents 69e7b4b + 6c999bb commit 1f24e1e
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 13 deletions.
6 changes: 2 additions & 4 deletions packages/app-api/src/service/Shop/dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ export class ShopListingOutputDTO extends TakaroModelDTO<ShopListingOutputDTO> {
@IsNumber()
price!: number;
@IsString()
@IsOptional()
name?: string;
name: string;
@IsISO8601()
@IsOptional()
deletedAt?: Date;
Expand All @@ -63,8 +62,7 @@ export class ShopListingCreateDTO<T = void> extends TakaroDTO<T> {
@IsNumber()
price!: number;
@IsString()
@IsOptional()
name?: string;
name: string;
@IsBoolean()
@IsOptional()
draft?: boolean;
Expand Down
6 changes: 3 additions & 3 deletions packages/lib-apiclient/src/generated/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Takaro app-api
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: development - 79d1da12fecd3c58d8d51f65aa8e58e2473d1694
* The version of the OpenAPI document: development - 89afe913b9508ea5a7464ac1d009d207112df754
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -7944,7 +7944,7 @@ export interface ShopListingCreateDTO {
* @type {string}
* @memberof ShopListingCreateDTO
*/
name?: string;
name: string;
/**
*
* @type {boolean}
Expand Down Expand Up @@ -8074,7 +8074,7 @@ export interface ShopListingOutputDTO {
* @type {string}
* @memberof ShopListingOutputDTO
*/
name?: string;
name: string;
/**
*
* @type {NOTDOMAINSCOPEDTakaroModelDTOCreatedAt}
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-apiclient/src/generated/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Takaro app-api
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: development - 79d1da12fecd3c58d8d51f65aa8e58e2473d1694
* The version of the OpenAPI document: development - 89afe913b9508ea5a7464ac1d009d207112df754
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-apiclient/src/generated/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Takaro app-api
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: development - 79d1da12fecd3c58d8d51f65aa8e58e2473d1694
* The version of the OpenAPI document: development - 89afe913b9508ea5a7464ac1d009d207112df754
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-apiclient/src/generated/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Takaro app-api
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: development - 79d1da12fecd3c58d8d51f65aa8e58e2473d1694
* The version of the OpenAPI document: development - 89afe913b9508ea5a7464ac1d009d207112df754
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-apiclient/src/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Takaro app-api
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: development - 79d1da12fecd3c58d8d51f65aa8e58e2473d1694
* The version of the OpenAPI document: development - 89afe913b9508ea5a7464ac1d009d207112df754
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Knex } from 'knex';

export async function up(knex: Knex): Promise<void> {
// Set all listings w/o name to 'Unnamed'
await knex('shopListing').whereNull('name').update({ name: 'Unnamed' });

await knex.schema.alterTable('shopListing', (table) => {
table.string('name').notNullable().alter();
});
}

export async function down(knex: Knex): Promise<void> {
await knex.schema.alterTable('shopListing', (table) => {
table.string('name').nullable().alter();
});
}
2 changes: 1 addition & 1 deletion packages/lib-gameserver/src/gameservers/7d2d/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class SevenDaysToDie implements IGameServer {

async giveItem(player: IPlayerReferenceDTO, item: string, amount: number = 1, quality?: string): Promise<void> {
const command = this.connectionInfo.useCPM
? `giveplus EOS_${player.gameId} ${item} ${amount} ${quality ?? ''} 0`
? `giveplus EOS_${player.gameId} ${item} ${amount} ${quality ? quality + ' 0' : ''}`
: `give EOS_${player.gameId} ${item} ${amount} ${quality ?? ''}`;
const res = await this.executeConsoleCommand(command);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function Component() {

const onSubmit: SubmitHandler<FormValues> = ({ name, items, price, draft }) => {
mutate({
name: name ? name : undefined,
name: name ? name : 'Unnamed',
price,
gameServerId,
items,
Expand Down

0 comments on commit 1f24e1e

Please sign in to comment.