addOrUpdate

open suspend override fun addOrUpdate(entity: T): T

sends a post-(for add) or a put-(for update) request to remote/{id} with the serialized entity in it's body. The initialId is used to determine if it should add or updated.

Return

the added or saved entity

Parameters

entity

entity to save