def publish(id):
	job = _get_job(id)
	post_data = get_post_data()

	# validates if photos is sent
	if 'photos' not in post_data:
		abort(400, { 'message': 'Photos should be sent.'})

	# if the status is assigned
	if job.status == 'ASSIGNED' or job.status == 'REDO':

		# patch the media to job
		job.medias = post_data
		job.put()

		create_activity('JOB_PUBLISHING_STARTED', job=job)

		# enqueue the job to be processed
		# when this task is processed the job will become REVIEW
		Job.enqueue_for_processing_media(job.key.id())

		return jsonify(data={}), 201
	else:
		abort(400, {'message': CANNOT_PUBLISH_JOB_MESSAGE })