-
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.
feat: add duplicate shop endpoint (#161)
Adds a separate POST shops/duplicate endpoint for shop creation purposes.
- Loading branch information
1 parent
fcc8584
commit 5c80d3f
Showing
4 changed files
with
27 additions
and
0 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,20 @@ | ||
import {AbstractPrivateEndpoint} from '@/model/endpoint/AbstractPrivateEndpoint'; | ||
import {type CreateDefinition} from '@/model/endpoint/AbstractEndpoint.types'; | ||
import {type HttpMethod} from '@/types/request.types'; | ||
import {type DuplicateShop} from './Shop.types'; | ||
|
||
type PostShopDuplicateDefinition = CreateDefinition<{ | ||
name: typeof PostShopDuplicate.name; | ||
body: DuplicateShop[]; | ||
response: {ids: [{id: number}]}; | ||
}>; | ||
|
||
/** | ||
* The PostShopDuplicate endpoint is used to add a new shop. | ||
*/ | ||
export class PostShopDuplicate extends AbstractPrivateEndpoint<PostShopDuplicateDefinition> { | ||
public readonly method: HttpMethod = 'POST'; | ||
public readonly name = 'postShopDuplicate'; | ||
public readonly path = 'shops/duplicate'; | ||
public readonly property = 'ids'; | ||
} |
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